Jump to content
  • 0
tedexx

Best way to get floating value?

Question

3 answers to this question

Recommended Posts

  • 0

It really depends on what you want to achieve

Though Hercules doesn't support floating values , you could do it in source (assuming that you won't pass any values from script to source)

Share this post


Link to post
Share on other sites
  • 0

You could also emulate it in your scripts by adding some zeros to your numbers, ie

.@percent = rand(10000);

if (.@percent == 4273) {
    // 42.73%
}

Share this post


Link to post
Share on other sites
  • 0

 

You could also emulate it in your scripts by adding some zeros to your numbers, ie

.@percent = rand(10000);

if (.@percent == 4273) {
    // 42.73%
}

 

Nope, something like calculate the % of EXP a quest will give for the current basejob, or anything slightly more complex. It will always exists a workaround, but with float would be so much simpler.

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.