RPTools.net

Discussion and Support

Skip to content

It is currently Sun May 19, 2013 4:48 am 




Forum rules


PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)



Reply to topic  [ 3 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Cave Troll
 
Joined: Mon Aug 01, 2011 5:43 am
Posts: 96
Location: Crete,Greece
 Post subject: Help with "Round" function
PostPosted: Mon Apr 23, 2012 12:08 pm 
Hello,
I recently faced a problem with the "Round" function
The code is simple:

Code:
[h: Fortitude_Save_Realistic = Target_Fortitude_Save_Realistic + 0.50]
[h: Fortitude_Save = Round(Target_Fortitude_Save_Realistic)]
[h: Reflex_Save_Realistic = Target_Reflex_Save_Realistic + 0.33]
[h: Reflex_Save = Round(Target_Reflex_Save_Realistic)]
[h: Willpower_Save_Realistic = Target_Willpower_Save_Realistic + 0.33]
[h: Willpower_Save = Round(Target_Willpower_Save_Realistic)]


At lvl 3 i get numbers on "_Realistic" like 0.66
Normally the "Round" function has to make that 1 because 0.66 is closer to 1 than 0.
But...
The "Round" rounds 0.66 to 0.

This ruins all my effords to generate the correct number to player's saving throws.
Can anyone help me?

_________________
High Templar of Ur


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5300
Location: Bay Area
 Post subject: Re: Help with "Round" function
PostPosted: Mon Apr 23, 2012 3:18 pm 
There's probably something else going on that can't be determined by the above code. I would just say to validate your data at each step.

_________________
Downloads:


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Aug 01, 2011 5:43 am
Posts: 96
Location: Crete,Greece
 Post subject: Re: Help with "Round" function
PostPosted: Tue Apr 24, 2012 9:47 am 
Yes, it was somehing like this
I was asking for Target_Fortitude_Save_Realistic from the player's token.
The right way was to get the GM's values stored for that player.
Anyway problem was solved!
Thanks

_________________
High Templar of Ur


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 3 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman