[WARNING] in PWN -
Alexander8 - 02.11.2013
i got an event system and i added it to my GM but this Warning appeard
Код:
warning 203: symbol is never used: "event"
what should i do to fix it ?
Re: [WARNING] in PWN -
]Rafaellos[ - 02.11.2013
Find :
And remove it.
Re: [WARNING] in PWN -
Alexander8 - 02.11.2013
Quote:
Originally Posted by ]Rafaellos[
|
i did that but still got the error , here's the Very top of this Event code and one choice from it
pawn Код:
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;
}
Re: [WARNING] in PWN - Astralis - 02.11.2013
Quote:
Originally Posted by Alexander8
i did that but still got the error , here's the Very top of this Event code and one choice from it
pawn Код:
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 Код:
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;
}
Re: [WARNING] in PWN -
Alexander8 - 02.11.2013
Quote:
Originally Posted by Neonman
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; }
|
Do i can put this in my gm or i have to put it as a filter script ?
Re: [WARNING] in PWN -
RayDcosta - 02.11.2013
sir you "have to" integrate it into your GM as using this as a filterscript will need you to redefine everything that u have defined in your main GM
Re: [WARNING] in PWN -
Alexander8 - 02.11.2013
Sorry im new in scripting , after putting the code iNTO my GM ,then what i have to do ?
Re: [WARNING] in PWN -
Ghazal - 02.11.2013
Warning Isnt As Error .. You Can Compile It And There Will Be No Errors.
Re: [WARNING] in PWN -
Alexander8 - 02.11.2013
Quote:
Originally Posted by Maro06
Warning Isnt As Error .. You Can Compile It And There Will Be No Errors.
|
so if i added this code to my GM and Compile it , it work work instead of these warnings ?
Re: [WARNING] in PWN -
Alexander8 - 02.11.2013
these warnings made the SCript not working , i think i need to add defines but i dunno can someone tell me what difines to add ?