SA-MP Forums Archive
[Ajuda] Crash Detect - 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] Crash Detect (/showthread.php?tid=562697)



Crash Detect - Feio - 11.02.2015

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


Re: Crash Detect - Delete_ - 11.02.2015

tem q ve isso ai


Re: Crash Detect - JonathanFeitosa - 11.02.2015

lal

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


Re: Crash Detect - View - 11.02.2015

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