SA-MP Forums Archive
[WARNING] in PWN - 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: [WARNING] in PWN (/showthread.php?tid=473265)



[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 :

pawn Код:
new event;
And remove it.


Re: [WARNING] in PWN - Alexander8 - 02.11.2013

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Find :

pawn Код:
new event;
And remove it.
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 ?