random numbers bug or?
#1

PHP код:
CMD:test(playerid,params[]){
new 
result random(15-5)+5*-1;
format(String,sizeof(String),"Result = %i",result);
MSG(playerid,-1,String);
return 
1;} 
I want it to gimme random number between -5 to -15, why it's giving me sometimes numbers above -5 (means like -3 or even postive numbers such as 4 etc)
Reply


Messages In This Thread
random numbers bug or? - by Lirbo - 18.01.2016, 07:59
Re: random numbers bug or? - by Trucido - 18.01.2016, 08:04
Re: random numbers bug or? - by Lirbo - 18.01.2016, 08:27
Re: random numbers bug or? - by PrO.GameR - 18.01.2016, 08:30
Re: random numbers bug or? - by Lirbo - 18.01.2016, 08:32

Forum Jump:


Users browsing this thread: 2 Guest(s)