SA-MP Forums Archive
How to bypass -2,147,483,648‬? - 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: How to bypass -2,147,483,648‬? (/showthread.php?tid=619010)



How to bypass -2,147,483,648‬? - danielpalade - 12.10.2016

As you know, you can't have more than 2,147,483,648‬$ because it will go negative.
Is there a way to bypass this?


Re: How to bypass -2,147,483,648‬? - NeXoR - 12.10.2016

Hmm, you can save it as string and convert it to multiple ints somehow


Re: How to bypass -2,147,483,648‬? - Vince - 12.10.2016

No. A 64-bit variable can store a value up to 9,223,372,036,854,775,807 (however much that is) but Pawn does not support this. It also requires a 64-bit capable system and a 64-bit application.

If the variable in question stores money then I think it's time to "deflate" your server's economy.


Re: How to bypass -2,147,483,648‬? - danielpalade - 12.10.2016

Quote:
Originally Posted by Vince
Посмотреть сообщение
No. A 64-bit variable can store a value up to 9,223,372,036,854,775,807 (however much that is) but Pawn does not support this. It also requires a 64-bit capable system and a 64-bit application.

If the variable in question stores money then I think it's time to "deflate" your server's economy.
I've seen a lot of servers having users with over 3,000,000,000 and not having a negative balance. So there must be a way.


Re: How to bypass -2,147,483,648‬? - Luis- - 12.10.2016

Quote:
Originally Posted by danielpalade
Посмотреть сообщение
I've seen a lot of servers having users with over 3,000,000,000 and not having a negative balance. So there must be a way.
Sure they're not using a textdraw?


Re: How to bypass -2,147,483,648‬? - danielpalade - 12.10.2016

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Sure they're not using a textdraw?
100% positive. When you do /stats, it even displays the money you have. And yes, it's over 3,000,000,000.
Currently trying to figure out how I can save the money into a string instead of an integer. Hope that it works out.


Re: How to bypass -2,147,483,648‬? - Kaliber - 12.10.2016

Here you go: https://sampforum.blast.hk/showthread.php?tid=372994


Re: How to bypass -2,147,483,648‬? - AbyssMorgan - 12.10.2016

https://sampforum.blast.hk/showthread.php?tid=598933


Re: How to bypass -2,147,483,648‬? - Luicy. - 12.10.2016

Server sided money?


Re: How to bypass -2,147,483,648‬? - danielpalade - 12.10.2016

Quote:
Originally Posted by Luicy.
Посмотреть сообщение
Server sided money?
And how would I go about that?