Hismoon Posted March 22, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 48 Reputation: 0 Joined: 12/07/11 Last Seen: March 15, 2022 Share Posted March 22, 2012 Hello, I have a script in these I want to calculate with point values like 0,33*5 or so on. But now is the problem that the ragnarok server didn't calculate with point values as far as I know. I have test the script on my server, but if I load the script comes the error that something is with the 0,33 like: parse_simpleexpr: unmatch ')' line xxx: set .@x, (0','33*5+3); I hope someone can help me with this problem. Hismoon~ Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted March 23, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted March 23, 2012 There's no float in the script engine. To support it you have to multiply per 100 (or much). Example: set .@x, 33 * 5 + 300; // .@x/100 = your result Another thing is to assume that 0.33 = 1/3 so: set .@x, 5/3 + 3; But the result here is trunk: Floor(result). 1 Quote Link to comment Share on other sites More sharing options...
Question
Hismoon
Hello,
I have a script in these I want to calculate with point values like 0,33*5 or so on.
But now is the problem that the ragnarok server didn't calculate with point values as far as I know.
I have test the script on my server, but if I load the script comes the error that something is with the 0,33 like:
I hope someone can help me with this problem.
Hismoon~
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.