I'm trying to get a string with multiple numbers to a single int like this:
x="5+5" --amount of numbers is not constant
y=tonumber(x)
print(y)
The result of this is nil while it should be 10 (int). The only way I could solve this is by first searching all the "+" and "-" with string.find() then cutting it to all the necessary parts and from there just tonumber(). It feels stupid to code at least a hundred rows of code for such a simple problem.