SA-MP Forums Archive
Integer maximum? - 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: Integer maximum? (/showthread.php?tid=344826)



Integer maximum? - Roel - 22.05.2012

Hello, again a question,

why returns this a value of -641134592

expirestamp = 7948800000;

Is this number to long??


Re: Integer maximum? - ViniBorn - 22.05.2012

Yes.

Minimun : -2.147.483.648
Maximum : 2.147.483.647


Re: Integer maximum? - Roel - 22.05.2012

Thanks, that sucks a little... so working with timestamps isn't an option in this case...

[EDIT] pfff, never trust tutorials on the internet, it seems timestamp is in seconds and not in milliseconds...


Re: Integer maximum? - IceCube! - 22.05.2012

YOu could make a stock to make time stamps divide into little stamps solving your problem.


Re: Integer maximum? - Hiddos - 22.05.2012

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
YOu could make a stock to make time stamps divide into little stamps solving your problem.
Not really, considering 'too big numbers' would still be returned as random values from GetTickCount


Re: Integer maximum? - IceCube! - 22.05.2012

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Not really, considering 'too big numbers' would still be returned as random values from GetTickCount
Oh yeah, sorry I wrote somthing really stupid today :P.


Re: Integer maximum? - cessil - 23.05.2012

or use gettime() which will return a current time stamp in seconds