02.11.2013, 07:58
i got an event system and i added it to my GM but this Warning appeard
what should i do to fix it ?
Код:
warning 203: symbol is never used: "event"
warning 203: symbol is never used: "event"
new event;
COMMAND:event(playerid, params[])
{
if(GetAdminLevel(playerid) < 6) return SendClientError(playerid, CANT_USE_CMD);
if(event == 1) return SendClientError(playerid, CANT_USE_CMD);
if(sscanf(params, "sz", tmp, tmp2)) return SCP(playerid, "<derby/sumo/lms/custom/shipfight/stop>");
ResetEvent();
if(!strcmp(tmp, "stop", true, 4))
{
event = 0;
SendClientMessage(playerid, COLOR_YELLOW, "Event stopped.");
return 1;
}
else if(!strcmp(tmp, "derby", true, 5))
{
event = 1;
eventsignup = 1;
GameTextForAll("~r~Derby event started~n~~w~/join ~w~to enter!", 8000, 1);
SendClientMessageToAll(COLOR_YELLOW, "[EVENT] An administrator has started a DERBY event. Type /join to enter!");
SendClientMessageToAll(COLOR_YELLOW, "[EVENT] You have 30 seconds to /join before it closes.");
SetTimer("EventSignup", 30000, false);
format(iStr, sizeof(iStr), "7..: [EVENT] %s[%d] has started a DERBY event ::.", PlayerName(playerid), playerid);
iEcho(iStr);
return 1;
}
i did that but still got the error , here's the Very top of this Event code and one choice from it
pawn Код:
|
new event=0;
COMMAND:event(playerid, params[])
{
if(GetAdminLevel(playerid) < 6) return SendClientError(playerid, CANT_USE_CMD);
if(event == 1) return SendClientError(playerid, CANT_USE_CMD);
if(sscanf(params, "sz", tmp, tmp2)) return SCP(playerid, "<derby/sumo/lms/custom/shipfight/stop>");
ResetEvent();
if(!strcmp(tmp, "stop", true, 4))
{
event = 0;
SendClientMessage(playerid, COLOR_YELLOW, "Event stopped.");
return 1;
}
else if(!strcmp(tmp, "derby", true, 5))
{
event = 1;
eventsignup = 1;
GameTextForAll("~r~Derby event started~n~~w~/join ~w~to enter!", 8000, 1);
SendClientMessageToAll(COLOR_YELLOW, "[EVENT] An administrator has started a DERBY event. Type /join to enter!");
SendClientMessageToAll(COLOR_YELLOW, "[EVENT] You have 30 seconds to /join before it closes.");
SetTimer("EventSignup", 30000, false);
format(iStr, sizeof(iStr), "7..: [EVENT] %s[%d] has started a DERBY event ::.", PlayerName(playerid), playerid);
iEcho(iStr);
return 1;
}
pawn Код:
|