1
I want to take Output from a moon 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 got!
a= "print('stackoverflow')"
b = loadstring(a)
print(b())
But I wanted you to show if I had a mistake too.
I don’t understand what you want. Try to assemble a code that shows something. Explain in detail. Tell me where you’re going, there might be another way to do the same.
– Maniero
I edited the question.
– Gabriel Sales
Yes, but I wanted you to indicate the error, sorry I wasn’t clear. EX: Attempt to call a nil value.
– Gabriel Sales