[Ajuda] array index out of bounds - wtf?
#4

Obrigado humildadeforever.

Mas nesse caso, faзo oque? :

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
        switch(Stats[playerid])
        {
            case 1:
            {
                DisablePlayerRaceCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid, 0, CPC1[2][1], CPC1[2][2], CPC1[2][3], CPC1[3][1], CPC1[3][2], CPC1[3][3], 10);
                Stats[i] = 2;
                return 1;
            }
            case 2:
            {
                DisablePlayerRaceCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid, 0, CPC1[3][1], CPC1[3][2], CPC1[3][3], CPC1[4][1], CPC1[4][2], CPC1[4][3], 10);
                Stats[i] = 3;
                return 1;
            }
            case 3:
            {
                DisablePlayerRaceCheckpoint(playerid);
                SetPlayerRaceCheckpoint(playerid, 1, CPC1[4][1], CPC1[4][2], CPC1[4][3], CPC1[4][1], CPC1[4][2], CPC1[4][3]-5, 10);
                Stats[i] = 4;
                return 1;
            }
            case 4:
            {
                DisablePlayerRaceCheckpoint(playerid);
                GameTextForPlayer(playerid, "You have won the race!!", 3000, 1);
                GivePlayerMoneyEx(playerid, 10000);
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
array index out of bounds - wtf? - by AiaN - 29.11.2012, 05:08
Re: array index out of bounds - wtf? - by mau.tito - 29.11.2012, 07:46
Re: array index out of bounds - wtf? - by humildadeforever - 29.11.2012, 07:53
Re: array index out of bounds - wtf? - by AiaN - 30.11.2012, 02:30
Re: array index out of bounds - wtf? - by humildadeforever - 30.11.2012, 09:30
Re: array index out of bounds - wtf? - by AiaN - 01.12.2012, 00:05
Re : array index out of bounds - wtf? - by ipsBruno - 01.12.2012, 06:53

Forum Jump:


Users browsing this thread: 1 Guest(s)