SA-MP Forums Archive
[Ajuda] Erros Simples - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erros Simples (/showthread.php?tid=454919)



Erros Simples - ThiagoMK - 30.07.2013

Galera coloquei esse anti fake kill:
pawn Код:
new LastDeath[ MAX_PLAYERS ];
new DeathSpam[ MAX_PLAYERS char ];

public OnPlayerDeath(playerid, killerid, reason)
{
    new time = gettime( );
    switch( time - LastDeath[ playerid ] )
    {
        case 0 .. 3:
        {
            DeathSpam{ playerid }++;
            if( DeathSpam{ playerid } == 3 )
            {
                BanEx( playerid, "Fake-kill" );
                return 1;
            }
        }
        default: DeathSpam{ playerid } = 0;
    }
    LastDeath[ playerid ] = time;
    return 1;
}
E deu esses erros:
pawn Код:
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(18) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(18) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(19) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(19) : error 008: must be a constant expression; assumed zero
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(19) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Analia\Desktop\BmcV2.0\gamemodes\BRT.pwn(19) : fatal error 107: too many error messages on one line
As linhas sгo essas:
pawn Код:
new LastDeath[ MAX_PLAYERS ];
new DeathSpam[ MAX_PLAYERS char ];



Re: Erros Simples - Mteck - 30.07.2013

pawn Код:
#define MAX_PLAYERS  100    // Geralmente eu coloco sempre 50 amais.



Re : Re: Erros Simples - ThiagoMK - 30.07.2013

Quote:
Originally Posted by Mteck
Посмотреть сообщение
pawn Код:
#define MAX_PLAYERS  100    // Geralmente eu coloco sempre 50 amais.
Os erros continuam ''Richard''


Re: Erros Simples - Mteck - 30.07.2013

Os erros mudaram?

@OFF Porquк todo mundo me chama desse "TAL" de Richard?


Re : Re: Erros Simples - ThiagoMK - 30.07.2013

Quote:
Originally Posted by Mteck
Посмотреть сообщение
Os erros mudaram?

@OFF Porquк todo mundo me chama desse "TAL" de Richard?
Os erros continuam igual

@OFF Eu posso chamar vocк de skol tbm


Re: Erros Simples - FenixBorn - 30.07.2013

Colocou ele dentro do public OnPlayerDeath??


Re : Re: Erros Simples - ThiagoMK - 30.07.2013

Quote:
Originally Posted by FenixBorn
Посмотреть сообщение
Colocou ele dentro do public OnPlayerDeath??
Coloquei..