Does Y_INI have integer limit ? - 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: Does Y_INI have integer limit ? (
/showthread.php?tid=503480)
Does Y_INI have integer limit ? -
blackeagle1122 - 29.03.2014
Hi,
I have a problem about saving integer with Y_INI,
When I try to save this variable:
pawn Код:
new variable = 1425925004;
Crashdetect gives me this error:
Код:
[debug] Run time error 6: "Invalid instruction"
But when i try to save this variable:
pawn Код:
new variable = 1394389067;
Y_INI saves it without any error.
I am now saving it as string.
But I want to know what is the problem ?
Re: Does Y_INI have integer limit ? -
Vince - 29.03.2014
Pawn supports signed 32 bit integers. Which means that you can save anything from -2,147,483,648 to 2,147,483,647. Your value is still in that range, so it should theoretically work. What else does crashdetect output?
Re: Does Y_INI have integer limit ? -
blackeagle1122 - 30.03.2014
Quote:
Originally Posted by Vince
Pawn supports signed 32 bit integers. Which means that you can save anything from -2,147,483,648 to 2,147,483,647. Your value is still in that range, so it should theoretically work. What else does crashdetect output?
|
Код:
[16:39:19] [debug] #1 00000039 in public cmd_adsureban () at C:\Documents and Settings\...\include\float.inc:102
[16:39:19] [debug] #2 native CallLocalFunction () [080dbf60] from samp03svr
[16:39:19] [debug] #3 0000a27c in public OnPlayerCommandText (playerid=48, cmdtext[]=@0x015b4fa4 "/adsureban 44 reklam 365") at C:\Documents and Settings\...\include\zcmd.inc:108
And thats the variable, I can print(f) it without any error but when I try to save, crashes.
pawn Код:
new time = gettime() + (365 * 86400); // crashes when save with y_ini
new time2 = gettime() + (30 * 86400); // works well
Re: Does Y_INI have integer limit ? -
blackeagle1122 - 30.03.2014
****** can you take a look please