sscanf warning problem - 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: sscanf warning problem (
/showthread.php?tid=431361)
sscanf warning problem -
dash5487 - 17.04.2013
hey guys i want to make a /wave command with case 1 2 it will work but gives the warning on server log
PHP код:
[00:34:46] sscanf warning: Format specifier does not match parameter count.
on top
new aid;
my code
Код:
dcmd(wave,4,cmdtext);
PHP код:
dcmd_wave(playerid,params[])
{
if(sscanf(params, "us[100]",aid))
{
SendClientMessage(playerid,COLOR_ERROR,"usage: /wave[1 -2 ]");
return 1;
}
switch(aid) {
case 1:ApplyAnimation(playerid,"ON_LOOKERS","wave_loop", 4.1, 0, 0, 0, 0, 0, 1);
case 3:ApplyAnimation(playerid,"KISSING","gfwave2", 4.1, 0, 0, 0, 0, 0, 1);
}
return 1;
}
Re: sscanf warning problem -
HurtLocker - 17.04.2013
if(sscanf(params, "us[100]",aid))
here you ve got to make like this: if(sscanf(params, "us[100]", variable, string))
Re: sscanf warning problem -
TomatoRage - 17.04.2013
If(sscanf(params,"i",aid))
You did s and you did u