[Ajuda] Erros crashdetect
#1

Olб. Estou programando minha gamemode, e quando me deparo com os logs me vem isso. Alguйm tem ideia do que seja?

PHP код:
[17:50:15] [debugRun time error 4"Array index out of bounds"
[17:50:15] [debug]  Accessing element at index 2 past array upper bound 1
[17:50:15] [debugAMX backtrace:
[
17:50:15] [debug#0 00032ed8 in public OnPlayerLogin (playerid=0, password[]=@00551c3c "w554879") at new.pwn:789
[17:50:15] [debug#1 0003b03c in public OnDialogResponse (playerid=0, dialogid=1, response=1, listitem=-1, inputtext[]=@00551c3c "w554879") at new.pwn:1536 
Cуdigo
PHP код:
function::OnPlayerLogin(playeridpassword[])
{
    if(!
strlen(password))
    {
        
SendClientMessage(playeridCOLOR_LIGHTRED" Digite sua senha.");
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Fazendo o login"TextoLogin"Entrar""Sair");
        return 
1;
    }
    new 
zQuery[156], DBResult:zResult;
    
SHA256_PassHash(password"123d1dfqwede2e"HashPasssizeof(HashPass));
    
format(zQuerysizeof(zQuery), "SELECT * FROM `accounts` WHERE `name` = '%q' AND `password` = '%q'"PlayerName(playerid), HashPass);
    
zResult db_query(sConnectzQuery);
    
    if(
db_num_rows(zResult) == 0)
    {
        if(
GetPVarInt(playerid"WrongPassword") >= 4)
        {
            
SendClientMessage(playeridCOLOR_LIGHTRED" Vocк errou sua senha mais de 5 vezes, e foi kickado.");
            
DeletePVar(playerid"WrongPassword");
            
Kick(playerid);
            return 
1;
        }
        
SendClientMessage(playeridCOLOR_LIGHTRED" Sua senha estб incorreta.");
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Fazendo o login"TextoLogin"Entrar""Sair");
        
SetPVarInt(playerid"WrongPassword"GetPVarInt(playerid"WrongPassword")+1);
    }
    else
    {
        
// infos da conta
    
}
    
db_free_result(zResult);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)