Integer in Trillions

aliz94aliz94 Member, PRO Posts: 19

I have a display text for an integer that goes up to the trillions.

I'm currently using padint (game.money,14) and it works perfectly on Preview, but when I try on my device it displays as something like -0000378924.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    Hi @aliz94

    Couple of things to mention:

    The maximum initial value for an integer is 1,000,000.

    Then if you add a number to this, the maximum that can now be displayed is 99 million.

    And with what you're after, providing your trillion is what I consider a trillion, i.e a thousand million, then the pad number should be 9, not 14. (but as I say, Display text can't show more than 99,000,000), i.e a padint of 8). Hope that helps.

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @gyroscope 1000 million = 1 billion. :#

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • aliz94aliz94 Member, PRO Posts: 19

    Gyroscope always to the rescue.

    Is there anyway to get around this? The nature of this game requires me to have the integer over 99,000,000.

    @gyroscope said:
    Hi aliz94

    Couple of things to mention:

    The maximum initial value for an integer is 1,000,000.

    Then if you add a number to this, the maximum that can now be displayed is 99 million.

    And with what you're after, providing your trillion is what I consider a trillion, i.e a thousand million, then the pad number should be 9, not 14. (but as I say, Display text can't show more than 99,000,000), i.e a padint of 8). Hope that helps.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    @tatiang said:
    gyroscope 1000 million = 1 billion. :#

    Oh yes, of course it is, thanks for correcting me, then a thousand billion (or a million million) is a trillion...

    @aliz94 said:
    Gyroscope always to the rescue.

    Is there anyway to get around this? The nature of this game requires me to have the integer over 99,000,000.

    Both billions and trillions are out of bounds in GSC, sorry to tell you, and there isn't any way around that.... : :'( (At least, not that I know of...)

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited June 2014

    @aliz94 said:
    Gyroscope always to the rescue.

    Is there anyway to get around this? The nature of this game requires me to have the integer over 99,000,000.

    Can you fake it? If your score or whatever you're keeping track of increases in large values (e.g. a thousand at a time), you could just have static images of the first three digits (ones, tens, and hundreds places) and then use mathematical formulas to display the remaining digits. Although with trillions we're talking about numbers like 99,000,000,000,000 so I'm not sure even that would work.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.