Error Problem please help
#1

Hi guys i've got this errors:

pawn Код:
../gamemodes/OnTimers.pwn(196) : error 002: only a single statement (or expression) can follow each "case"
../gamemodes/OnTimers.pwn(196 -- 198) : error 029: invalid expression, assumed zero
../gamemodes/OnTimers.pwn(198) : error 032: array index out of bounds (variable "PlayerInfo")
../gamemodes/OnTimers.pwn(198) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
on these line is:

pawn Код:
if(PlayerInfo[i][pPizzaTime] > 0)
            {
                if(PlayerInfo[pJobTime][i] == 1)
                {
                    PlayerInfo[i][pPizzaTime]--;
                    format(string, 128, "%d", PlayerInfo[i][pPizzaTime]);
                    GameTextForPlayer(i, string, 4000, 6);
                }
                else if(PlayerInfo[i][pPizzaTime] == 0)
                {
                    if(PlayerInfo[pJobTime][i] == 1)
                    {
                        SendClientMessage(i,COLOR_LIGHTRED,"[FALLITO]: Hai fatto raffredare la pizza.");
                        PlayerInfo[pJobTime][i] = 0;
                        PlayerInfo[playerid][pCheckpoint] = CHECKPOINT_NONE;
                        DisablePlayerCheckpoint(i)
                    }
                }
            }


etc....
Help
Reply
#2

You switched the order of i and pJobTime here: if(PlayerInfo[pJobTime][i] == 1)
And you should put all the stuff after a case ...: in { }:
pawn Код:
case 1:
{
    // all the code here
}
Reply
#3

Thanks man it works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)