SA-MP Forums Archive
Whats wrong with this? - 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: Whats wrong with this? (/showthread.php?tid=368220)



Whats wrong with this? - TheDeath - 12.08.2012

Код:
	new mymsg[10],test;
	test = randomEx(200,500);
	format(mymsg,sizeof(mymsg),"%s",randomEx(200,500));
	SendClientMessage(playerid, lime, mymsg);
Код:
stock randomEx(min, max)
{
    //Credits to ******
    new rand = random(max-min)+min;
    return rand;
}
It returns some random letter..


Re: Whats wrong with this? - Larceny - 12.08.2012

Quote:

format(mymsg,sizeof(mymsg),"%s",randomEx(200,500));

Use %d or %i instead of %s for integers.

https://sampwiki.blast.hk/wiki/Format


Re: Whats wrong with this? - TheDeath - 12.08.2012

Ohhhh hate these stupid wrongs i do