What is the size limitation of attributes by type ?

jfoc2009jfoc2009 Member Posts: 12
edited January 2012 in Tech Support
When using an attribute with type real and put the number 12345.56 it's OK, but when I use 123456.56 the result is always 12345.6.
So, to help me to project the maths behaviors I need to know the size limitations.
For example, I use this function to get last digit from a real number (A kind off numbers display) but I got ZERO because GS round it:

floor(((self.bankBalance * self.multiplier ) % self.div1 ) / self.div2 )

Where:
self.bankBalance = 12345.56
self.multiplier = 100
self.div1 = 10
self.div2 = 1

This is a actor prototype to be used to display digits from any position of a number: decimal, units, tens, hundreds, thousands, ten thousands, etc..

What I need:
GS not rounding the number. If is my mistake, please advise me.
Thanks a lot for any help

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi jfoc2009, I may be wrong, but that's looking like a bug to me... surely real attributes can handle numbers larger than 5 number places. It'll be interesting if that's confirmed then I guess your best bet is to contact GS HQ and/or put in a bug report.

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • jfoc2009jfoc2009 Member Posts: 12
    Thanks for your reply. In GS I will report a bug
  • jfoc2009jfoc2009 Member Posts: 12
    edited January 2012
    One more thing I saw:
    floor((12345.43*100)%10) = 3
    but
    floor((game.bankBalance*100)%10) = 0

    where game.bankBalance is set manually on attributes list to 12345.43 and is REAL typed
    For sure this is a BUG!
Sign In or Register to comment.