[WARNING] in PWN
#1

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 ?
Reply
#2

Find :

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

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;
    }
Reply
#4

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;
    }
Reply
#5

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 ?
Reply
#6

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

Sorry im new in scripting , after putting the code iNTO my GM ,then what i have to do ?
Reply
#8

Warning Isnt As Error .. You Can Compile It And There Will Be No Errors.
Reply
#9

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 ?
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)