Hello guys, I have a problem, I'm in need of using eval function from inside gtw, that calculates my function gives as String, for example Math.cos(5+9); and returning float.
I have been trying around with
However I can't make it work even for int numbers, not even for 5+2. Any idea how to fix that?
So you're trying to evaluate this, if I understand it correctly:
I would expect that to assign a string with three characters to the "myVar" variable. I wouldn't expect that coercing that string to int would produce 7, either. But the fix should be pretty clear, shouldn't it?