quote:
Originally posted by Shondoit
It took a little longer than I expected, becuase the function weren't called correctly... But here it is anyway
It's very easy to use... Just call StringName.Calculate()
i.e.:
var Expression = Message.substr(0,4)
Result = Expression.Calculate()
It supports presedence, exponents, parenthese multiplication ( 3(4+1) = 15) and Math object functions and constants, for example, you can calculate a function like this:
Result = "3(1 + sin(PI))^2".Calculate()
or
var x = -4
Result = "-sqrt(abs(x))".Calculate()
Awesome.
I think if there's a need of a calculator script, you deserve to make it, not me. My tab placement just sucks, and it's not worth to release it. I am sure you can make a good script with just that one function.
* Matti ends his crappy project.