I use luaVM in another programming language (Vala) and want to pass the code from vala to lua so that lua returns the result of executing this code as a string.
> s2="print (5+5)"
> s2
print (5+5)
> loadstring(s2)
function: 0x55834153f080
> func = loadstring(s2)
> func()
10
tried a lot of things, but I did not succeed, that is, I need instead of 10 was a variable of type string containing 10. So I could do vm.to_string(-1) of Vala and to obtain "10"
return tostring(5+5)local str = loadstring(s2)().