calculation = "1+1"
print(calculation)
--output: 1+1
How do I unstringify this in Roblox Lua? I don't want to use loadstring due to security issues nor does math.eval work...
What are my options to make this work?
I've tried to format it like this but it doesn't work, it outputs nil:
--I used string.byte to get the values of 1 and + and then I did this:
print(tonumber(string.char(49)) .. string.char(43)) .. tonumber(string.char(49)))
--I want to calculate it in a print but it doesn't work.
The characters + and -, are they strings or numbers???

1 comment
Use :sub()