What error 017: undefined symbol "params"
#1

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);
}

Reply
#2

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

Код:
#pragma unused params
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)