SA-MP Forums Archive
Larger integer than 32 bits? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Larger integer than 32 bits? (/showthread.php?tid=363481)



Larger integer than 32 bits? - Johnson_boy - 27.07.2012

Hello,

I have faced a problem with my server's bank system. One player has already reached the maximum value SA-MP's variables can hold, 2^31 (2,147,483,647).

Is there any way to store larger number than that in a variable?


Thank you already in advance.


Re: Larger integer than 32 bits? - Larceny - 27.07.2012

I think its not possible to store more than this.
Maybe you should use another variable to store his money.


Re: Larger integer than 32 bits? - milanosie - 27.07.2012

Not possible in this way by using a single integer.
Store his mobey in 2 variables instead and use one variable at a time untill it reaches 0. After that use the other full variable.
Only way i can think of atm