SA-MP Forums Archive
Out of range value collumn MYSQL - I REP ++ - 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: Out of range value collumn MYSQL - I REP ++ (/showthread.php?tid=547075)



Out of range value collumn MYSQL - I REP ++ - buburuzu19 - 20.11.2014

Players can only have 2,000,000,000$ max money if they have more than 2,000,000,000$ the money are going to -1294381238128381 and fucks up everything.
In my sql DB i tried to give me money 5000000000 and i am getting `Out of range value collumn` .
How to fix?
I rep ++ thankss,!


Re : Out of range value collumn MYSQL - I REP ++ - Dutheil - 20.11.2014

A variable integer can contain, 32 bits.

32 bits in binary it's : 1111111111111111111111111111111
Decimal it would : 2^31-1 -> 2 147 483 647

A variable can store "cellmin" ( -2 147 483 648 ) to "cellmax" ( 2 147 483 647 )


Re: Re : Out of range value collumn MYSQL - I REP ++ - buburuzu19 - 20.11.2014

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
A variable integer can contain, 32 bits.

32 bits in binary it's : 1111111111111111111111111111111
Decimal it would : 2^31-1 -> 2 147 483 647

So, the variable can store "cellmin" ( -2 147 483 648 ) to "cellmax" ( 2 147 483 647 )
So what is the fix for this problem ?
On other servers , the other players can have 10,000,000,000$.


Re : Out of range value collumn MYSQL - I REP ++ - Dutheil - 20.11.2014

To my knowledge, you can't it.


Re: Out of range value collumn MYSQL - I REP ++ - buburuzu19 - 20.11.2014

On other servers the players can have more than 2kkk , on my server max is 2kkk


Re : Out of range value collumn MYSQL - I REP ++ - Dutheil - 20.11.2014

You can display as string... otherwise I don't know


Re: Out of range value collumn MYSQL - I REP ++ - buburuzu19 - 20.11.2014

The database is not allowing me to put more than 2,000,000,000$


Re : Out of range value collumn MYSQL - I REP ++ - Dutheil - 20.11.2014

A database doesn't work as the Pawn compiler


Re: Out of range value collumn MYSQL - I REP ++ - biker122 - 20.11.2014

There will be some limit on everything. I don't actually know if you can hold more than 999m in SA:MP. But that's probably not possible.