Displaying Large Numbers

BluSpyderBluSpyder Member Posts: 129
edited September 2012 in Working with GS (Mac)
I'm working with displaying very large numbers. Right now it can get to hundreds of trillions, but depending on the player it could get to even more. And this deals with money, if you're curious as to why I would need such large numbers. The issue obviously is the scientific conversion of larger numbers (ie: 1e+07), mainly when just using the display text behavior.

I know that you can use the padInt(x,y) function, but I guess i don't understand it's limitations even with that. Say I place my index value to 467 trillion with the function at 14 0's. So padInt(game.index,14). But this still doesn't even convert it right, the value displays 467,000,014,929,920....? The actual value of my index shows in the back end still as 4.67e+14 and maybe can't convert that correctly? Is there anything to fix with this?

Also, I don't like to use this padInt function because my value could be anywhere from 1 to 1 quadrillion. But if i set the display text to be padInt(game.index,7), (for saving that first conversion to scientific), and my actual index's value is only 10, it will display with 0000010 or something like that. I know I could set a bunch of rules for matching values and just do: If index is <1000000 then display....blah blah. But that is so much extra work to just display numbers, and messy too.

Anyone have experience with this and know where to go from here? Thanks.

Comments

  • KiwiLeeKiwiLee Member Posts: 181
    Can u adjust your scoring? If trillions are still required then try dropping the last six digits and put a small m after the score ;-)
  • BluSpyderBluSpyder Member Posts: 129
    But that would hide their money. They will need to see more than just 100m or 467t. And decimals like 467.342t just isn't enough either..
  • BluSpyderBluSpyder Member Posts: 129
    Anyone?
Sign In or Register to comment.