Out of range value collumn MYSQL - I REP ++
#1

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,!
Reply
#2

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 )
Reply
#3

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$.
Reply
#4

To my knowledge, you can't it.
Reply
#5

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

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

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

A database doesn't work as the Pawn compiler
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)