[Ajuda] Crash Detect
#1

alguйm poderia ajudar ?por favor
PHP код:
 [debugRun time error 4"Array index out of bounds"
 
[debug]  Accessing element at index 4 past array upper bound 3
 
[debugAMX backtrace:
 [
debug#0 0006bfa4 in public PingKick () from admin.amx 
PHP код:
forward PingKick();
public 
PingKick()
{
    if(
ServerInfo[MaxPing] != 0)
    {
        
PingPos++; if(PingPos PING_MAX_EXCEEDSPingPos 0;
        
        for(new 
i,GetMaxPlayers();a;i++)
        {
            
PlayerInfo[i][pPing][PingPos] = GetPlayerPing(i);
            
            if(
GetPlayerPing(i) > ServerInfo[MaxPing])
            {
                if(
PlayerInfo[i][PingCount] == 0PlayerInfo[i][PingTime] = TimeStamp();
                   
PlayerInfo[i][PingCount]++;
                if(
TimeStamp() - PlayerInfo[i][PingTime] > PING_TIMELIMIT)
                {
                    
PlayerInfo[i][PingTime] = TimeStamp();
                    
PlayerInfo[i][PingCount] = 1;
                }
                else if(
PlayerInfo[i][PingCount] >= PING_MAX_EXCEEDS)
                {
                    new 
SumAveragexstring[128];
                    while (
PING_MAX_EXCEEDS) {
                        
Sum += PlayerInfo[i][pPing][x];
                        
x++;
                    }
                    
Average = (Sum PING_MAX_EXCEEDS);
                    
format(string,sizeof(string),"%s foi kickado do servidor. (Motivo: Alto Ping (%d) | Media (%d) | Maximo Permitido (%d) )"PlayerName2(i), GetPlayerPing(i), AverageServerInfo[MaxPing] );
                      
SendClientMessageToAll(grey,string);
                    
SaveToFile("KickLog",string);
                    
Kick(i);
                }
            }
            else if(
GetPlayerPing(i) < && ServerInfo[AntiBot] == 1)
            {
                
PlayerInfo[i][BotPing]++;
                if(
PlayerInfo[i][BotPing] >= 3BotCheck(i);
            }
            else
            {
                
PlayerInfo[i][BotPing] = 0;
            }
        }
    } 
alguйm poderia ajudar ?por favor
Reply
#2

tem q ve isso ai
Reply
#3

lal

Faz debug cara, deu nem vontade de ler o cуdigo.
Reply
#4

verifica a definiзгo da array global q a corresponde
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)