Jump to content
  • 0

Question

Posted

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~

1 answer to this question

Recommended Posts

Posted

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).

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...