| 12-17-2003, 03:46 AM | #1 |
uhh, weird thing, i am useing x to count amount of mana from my citys, it works till it hits around ~1300, then it starts flaken up real bad. i got no idea y, in stuff like pascal & c++ the limit for a norm int is 32502 or somthin like that (i took programing a year ago..) but actually, i need this int to go into the millions... (around 20-30 million could be the maximum population of your empire, mana represents people in citys, it goes to a multiboard... u get the drift i hope) so if anyone could tell me what the int max is, id like it |
| 12-17-2003, 05:06 AM | #2 |
what experiements have you done with the problem? Have you tried creating a trigger that deliberately increases the size by like 1 or so past the max number. |
| 12-17-2003, 05:52 AM | #3 |
Do you need to display *millions* on your leaderboard? (PS. Try using multiboard) If that's the case, I don't think it'll work. What you could do is convert every "1.200" in to a 1... And when those go to 1.200, if they do, make them 1 again, and then display the valvue with valvue X and then Millions or whatever. So you'd get like 4 millions, displayed. Regards Dead-Inside |
| 12-18-2003, 06:50 AM | #4 |
I know for a fact that a Wc3 Integer has a maximum value much, much higher than 1300. I was futzing around with calculator scripts and I definitely got more than 5 decimal places out of an integer. The max value is somewhere in the hundred thousands, I think... maybe even higher. |
| 12-18-2003, 08:26 AM | #5 |
If it's a normal 32bit long integer the range should be -2147483648 to 2147483647 |
| 12-18-2003, 08:59 AM | #6 |
Tech is right, i made a debug for this awhile ago, i hit about 2 billion before i decided to give it away, so there must be something wrong with your triggers. Another way to do it would be to make 1 mana = 100,000 people, since if your going to have that many people, individuals dont really matter. The max mana a unit can have however is 500,000 or 5 million, not sure. |
| 12-18-2003, 11:23 AM | #7 |
the int limit is I think 0x7FFFFFF anything after that returns a negative number. which translates to a very large number. That is to be stored it can display much larger numbers which is awkward, at best. |
| 12-18-2003, 12:20 PM | #8 |
thx all, i actually fixed this problem b4 i ever looked at this thread. it was a dumb error that had nothing 2 do with any of the above, though it is nice to know that the 32-bit number or whatever will cary me well past the 10millions, cause it is POSSIBLE, but not likely for a game to last long enough for that to happen. |
