Strval Bug ?
#1

Whenever I try to convert some numerical values stored in a string to an Integer using strval, the output is totally different from the actual numerical values stored withing a string.

Example:
Input:
new string[128]=114105116116105107;
new bug = strval(string);

Output:

-1591232621

So, the output is totally different and it's a negative value.
Reply
#2

You forgot quotes.

pawn Код:
new string[] = "114105116116105107";
new bug = strval(string);
printf("%s | %d", string, bug);
Reply
#3

PHP код:
string est une chaine de caractиre
new string[256]:
string[0] = ?
string[1] = ?
...... 
250X
str is a string 
new str [256]: 
str [0] =? 
str [1] =? 
250X ...... 
Reply
#4

Well the number is just way beyond a 32 bit cell (cellmax = 2147483647)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)