I want to get the output of a lua command and store it in a string. EX: print (1) output- > 1 getOutput ("print (1)") I would like to store the returned value in a string, in this case, 1.
Something like a debugger, it would execute the command and store the result in a string.
I did it!
a= "print('stackoverflow')"
b = loadstring(a)
print(b())
But I wanted you to show it if you had an error too.