[Ajuda] error 017: undefined symbol "i"
#1

Код:
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9799) : error 017: undefined symbol "i"
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9801) : error 012: invalid function call, not a valid address
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9801) : error 017: undefined symbol "i"
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9801) : error 029: invalid expression, assumed zero
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9801) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Linha 9799
Код:
if(Velocidade(i) >= 120 && GetPlayerState(i) == PLAYER_STATE_DRIVER && InAutoEscola[playerid] == 1)}
Linha 9801
Код:
 if(PassouLimite(i) >= 3)
Linha Completa
Код:
if(Velocidade(i) >= 120 && GetPlayerState(i) == PLAYER_STATE_DRIVER && InAutoEscola[playerid] == 1)//Aqui adicione tambйm a variбvel para ver se o player estб no teste, й sу colocar a variбvel depois do sinal '&&' que coloquei no final
    {
        if(PassouLimite(i) >= 3)
        {
            //Aqui suas funзхes para ele repitir o teste
            SendClientMessage(playerid, -1, "Vocк rodou no teste, motivo: passou de 120KM 3 vezes");
            PassouLimite(i) = 0;
            return 1;
        }
        SendClientMessage(playerid, -1, "Vocк passou do limite excedido");
        PassouLimite(i) += 1;
    }
Reply
#2

A variбvel "i" nгo foi declarada!

pawn Код:
new i;

for ( i = 0; i < MAX_PLAYERS; ++i ) {

    // Seu cуdigo

}
Reply
#3

Vocк fez o Loop ?
pawn Код:
for(new i; i < MAX_PLAYERS; i++) {
    if(Velocidade(i) >= 120 && GetPlayerState(i) == PLAYER_STATE_DRIVER && InAutoEscola[playerid] == 1)//Aqui adicione tambйm a variбvel para ver se o player estб no teste, й sу colocar a variбvel depois do sinal '&&' que coloquei no final
    {
        if(PassouLimite(i) >= 3)
        {
            //Aqui suas funзхes para ele repitir o teste
            SendClientMessage(playerid, -1, "Vocк rodou no teste, motivo: passou de 120KM 3 vezes");
            PassouLimite(i) = 0;
            return 1;
        }
        SendClientMessage(playerid, -1, "Vocк passou do limite excedido");
        PassouLimite(i) += 1;
    }
}
Reply
#4

Код:
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9800) : error 012: invalid function call, not a valid address
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9800) : warning 215: expression has no effect
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9800) : error 001: expected token: ";", but found ")"
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9800) : error 029: invalid expression, assumed zero
C:\Users\Anonimo\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(9800) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
APARECEU ISSO
Reply
#5

Pode me dizer qual й a linha 9800 ?
Reply
#6

Код:
if(Velocidade(i) >= 120 && GetPlayerState(i) == PLAYER_STATE_DRIVER && InAutoEscola(i) == 1)
Reply
#7

Mude:
pawn Код:
InAutoEscola(i)
Para:

pawn Код:
InAutoEscola[i]
Reply
#8

troque por

pawn Код:
if(Velocidade(i) >= 120 && GetPlayerState(i) == PLAYER_STATE_DRIVER && InAutoEscola[i] == 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)