SA-MP Forums Archive
What error 017: undefined symbol "params" - 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: What error 017: undefined symbol "params" (/showthread.php?tid=605393)



What error 017: undefined symbol "params" - Tween73 - 18.04.2016

What error 017: undefined symbol "params"

Quote:

if (strcmp("/w", cmdtext, true, 10) == 0)
{
#pragma unused params
if(!strlen(params)) return
SendClientMessage(playerid, COLOR_WHITE, "Usage:{FF0000} /w [0-1000]");
new weather = strval(params);
new string[128];
format(string,sizeof(string),"Your weather has been set to %d:00", weather);
SendClientMessage(playerid,COLOR_YELLOW,string);
return SetPlayerWeather(playerid, weather);
}
if (strcmp("/t", cmdtext, true, 10) == 0)
{
#pragma unused params
if(!strlen(params)) return
SendClientMessage(playerid, COLOR_WHITE, "Usage:{FF0000} /t [0-1000]");
new time = strval(params);
new string[128];
format(string,sizeof(string),"Your time has been set to %d:00", time);
SendClientMessage(playerid,COLOR_YELLOW,string);
return SetPlayerTime(playerid, time, 0);
}




Respuesta: What error 017: undefined symbol "params" - Xabi - 18.04.2016

Have you defined params variable? Also, if you're cheking for params, why do you use this line?

Код:
#pragma unused params



Re: What error 017: undefined symbol "params" - Crayder - 18.04.2016

This was obviously an attempt at converting from ZCMD or iZCMD or YCMD or similar to the old shitty strcmp method.

'params' is not a variable defined in OnPlayerCommandText. Your best fix would be going back to whatever command processor you were using before.