Errors
#1

pawn Код:
(1024) : error 008: must be a constant expression; assumed zero
(1030) : error 002: only a single statement (or expression) can follow each "case"
(1030 -- 1031) : error 029: invalid expression, assumed zero
(1034) : error 029: invalid expression, assumed zero
(1034) : warning 215: expression has no effect
(1034) : error 001: expected token: ";", but found "if"
(1055) : error 010: invalid function or declaration
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    switch(gPlayerCheckpointStatus[playerid])
    {
        case CP_WEPDEP: //1024
        {
            SendClientMessage(playerid, COLOUR_TAN, "You are Capturing the Weapon Depot. Hold it for 5 minutes!" );
            SendClientMessage(playerid, COLOUR_WHITE, "Do {F81414}NOT {FFFFFF}leave the checkpoint or the timer will {F81414}STOP" );
            SetTimer("WepDep", 300000, false);
        }
        if(gTeam[playerid] == TEAM_GROVE) //1030
        { //1031
            SendClientMessageToAll(COLOUR_GREEN, "Grove Street is capturing the Weapon Dep!" );
        }
        else if(gTeam[playerid] == TEAM_BALLAS) //1034
        {
            SendClientMessageToAll(COLOUR_PURPLE, "Ballas is capturing the Weapon Dep!" );
        }
        else if(gTeam[playerid] == TEAM_LOSAZTECAS)
        {
            SendClientMessageToAll(COLOUR_CYAN, "Los Aztecas is capturing the Weapon Dep!" );
        }
        else if(gTeam[playerid] == TEAM_VAGOS)
        {
            SendClientMessageToAll(COLOUR_YELLOW, "Los Vagos is capturing the Weapon Dep!" );
        }
        else if(gTeam[playerid] == TEAM_BIKERS)
        {
            SendClientMessageToAll(COLOUR_WHITE, "The Bikers are capturing the Weapon Dep!" );
        }
        else if(gTeam[playerid] == TEAM_LSPD)
        {
            SendClientMessageToAll(COLOUR_BLUE, "Los Santos' finest are capturing the Weapon Dep!" );
        }
    }
    return 1; //1055
}
Reply
#2

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    switch(gPlayerCheckpointStatus[playerid])
    {
        case CP_WEPDEP: //1024
        {
            SendClientMessage(playerid, COLOUR_TAN, "You are Capturing the Weapon Depot. Hold it for 5 minutes!" );
            SendClientMessage(playerid, COLOUR_WHITE, "Do {F81414}NOT {FFFFFF}leave the checkpoint or the timer will {F81414}STOP" );
            SetTimerEx("WepDep", 300000, false,"i",playerid);
            if(gTeam[playerid] == TEAM_GROVE) //1030
            { //1031
                SendClientMessageToAll(COLOUR_GREEN, "Grove Street is capturing the Weapon Dep!" );
            }
            else if(gTeam[playerid] == TEAM_BALLAS) //1034
            {
                SendClientMessageToAll(COLOUR_PURPLE, "Ballas is capturing the Weapon Dep!" );
            }
            else if(gTeam[playerid] == TEAM_LOSAZTECAS)
            {
                SendClientMessageToAll(COLOUR_CYAN, "Los Aztecas is capturing the Weapon Dep!" );
            }
            else if(gTeam[playerid] == TEAM_VAGOS)
            {
                SendClientMessageToAll(COLOUR_YELLOW, "Los Vagos is capturing the Weapon Dep!" );
            }
            else if(gTeam[playerid] == TEAM_BIKERS)
            {
                SendClientMessageToAll(COLOUR_WHITE, "The Bikers are capturing the Weapon Dep!" );
            }
            else if(gTeam[playerid] == TEAM_LSPD)
            {
                SendClientMessageToAll(COLOUR_BLUE, "Los Santos' finest are capturing the Weapon Dep!" );
            }
         }
    }
    return 1; //1055
}
Reply
#3

Ah thanks. I still got error 1024 though.
Reply
#4

Idea, use case for comparing variables:

pawn Код:
case 'TEAM_VAGOS': { }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)