Strval Bug
#1

Strval maximum 10 digit 32 bit cell (cellmax = 2147483647) but I want to be 11 digits.

How can I solve this?
Reply
#2

Divide your number into two or more variables, unless you want to make your own big numbers operations system, based on arrays. Each array slot will save one digit of your number. For example, 268 can be stored in a variable x = 268, but can also be stored in an array like this:
sizeof(array) = 3;
array[0] = 2;
array[1] = 6;
array[2] = 8;
Reply
#3

Solved.
Reply
#4

Quote:
Originally Posted by eco1999
Посмотреть сообщение
cache_get_field_content(row, "TCNo", szReturn, g_MySQLConnections); PlayerInfo[extraid][pTCNo] = strval(szReturn);

This value is 12345678901 // 11 digit // How do I make it
that's more than a 32 bit signed integer(AKA one pawn cell) can hold.
Reply
#5

Solved.
Reply
#6

Dude, even if it is possible to find a workaround (and it is possible), find a way to lower that value.
Reply
#7

Just leave it as a string as it was already said that you can't fit that number in one cell
pawn Код:
// enum blbalba
pTCNo[16]
// loading part
strcat((PlayerInfo[extraid][pTCNo][0] = EOS, PlayerInfo[extraid][pTCNo]), szReturn);
Reply
#8

Solved.
Reply
#9

Thank you to everyone, I solved the problem.
Reply
#10

Don't remove your posts, this could have helped others if they are having similar problem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)