SA-MP Forums Archive
Random with negative value - 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: Random with negative value (/showthread.php?tid=423088)



Random with negative value - Misiur - 16.03.2013

Hello. What is the result of random(-1)? Will it return random value from 0 to MAX_INT - 2? Or what?


Re: Random with negative value - [ABK]Antonio - 16.03.2013

[08:48:42] Negative Random Test #1: 1570445058
[08:48:42] Negative Random Test #2: 127631151
[08:48:42] Negative Random Test #3: 2035083621
[08:48:42] Negative Random Test #4: 2042455975
[08:48:42] Negative Random Test #5: 1510580053

for(new i=1; i < 6; i++) printf("Negative Random Test #%i: %i", i, random(-1));


Re: Random with negative value - Jefff - 16.03.2013

https://sampforum.blast.hk/showthread.php?tid=292813


Re: Random with negative value - Misiur - 16.03.2013

Thanks Jeff