[Ajuda] chatlog e debug
#1

Код:
[19:21:56] [debug] Run time error 4: "Array index out of bounds"
[19:21:56] [debug]  Accessing element at index 54 past array upper bound 47
[19:21:56] [debug] AMX backtrace:
[19:21:56] [debug] #0 00016fec in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=38.76939, weaponid=54) at C:\Users\lucas\Desktop\samp03x_svr_R1-2_win32\gamemodes\original.pwn:1023
[19:21:56] [debug] Run time error 4: "Array index out of bounds"
[19:21:56] [debug]  Accessing element at index 65535 past array upper bound 499
[19:21:56] [debug] AMX backtrace:
[19:21:56] [debug] #0 0001b9f8 in public OnPlayerDeath (playerid=0, killerid=65535, reason=54) at C:\Users\lucas\Desktop\samp03x_svr_R1-2_win32\gamemodes\original.pwn:1264
[19:21:56] [death] [Fy]Armistice died 54
[19:21:56] [debug] Run time error 4: "Array index out of bounds"
[19:21:56] [debug]  Accessing element at index 54 past array upper bound 47
[19:21:56] [debug] AMX backtrace:
[19:21:56] [debug] #0 00016fec in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=3.30000, weaponid=54) at C:\Users\lucas\Desktop\samp03x_svr_R1-2_win32\gamemodes\original.pwn:1023
tб floodando no meu chatlog isso ai, olhei o codigo e nгo achei nada de tгo errado
alguem sabe qq ta rolando?
Reply
#2

Estб usando algum tipo de Ant AMX?
Posta seu server_log.

Deu Algum Warning no seu GM ao compilar?
Reply
#3

nгo to usando nenhum antiamx
Код:
         ====================================
[19:45:48]         Adv Bases   
[19:45:48]          ====================================

[19:45:48] Number of vehicle models: 2
[19:45:48] [debug] Run time error 4: "Array index out of bounds"
[19:45:48] [debug]  Accessing element at index 65535 past array upper bound 19
[19:45:48] [debug] AMX backtrace:
[19:45:48] [debug] #0 00016aec in public OnPlayerTakeDamage (playerid=1, issuerid=65535, Float:amount=3.30000, weaponid=54) at C:\Users\lucas\Desktop\samp03x_svr_R1-2_win32\gamemodes\original.pwn:1022
[19:45:58] [debug] Run time error 4: "Array index out of bounds"
[19:45:58] [debug]  Accessing element at index 65535 past array upper bound 19
[19:45:58] [debug] AMX backtrace:
[19:45:58] [debug] #0 00016aec in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=4.95000, weaponid=54) at C:\Users\lucas\Desktop\samp03x_svr_R1-2_win32\gamemodes\original.pwn:1022
quando compila
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           4520 bytes
Code size:           481408 bytes
Data size:           250028 bytes
Stack/heap size:      16384 bytes; estimated max. usage=3156 cells (12624 bytes)
Total requirements:  752340 bytes
Reply
#4

server_log >> posta
Reply
#5

ja postei ..
Reply
#6

Entгo posta seu gm.
Reply
#7

Poste o OnPlayerDeath.
Reply
#8

isso deve acontecer porque vc deve ter um array muito grande, penso eu ...
Reply
#9

PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
     
SendDeathMessage(killerid,playerid,reason);
     new  
PlayerSkin=GetPlayerSkin(playerid);
    new  
Float:AngleFloat:xFloat:yFloat:z;
    
       
SpecDelay[playerid]=2;
       
    if(
PlayerInfo[playerid][PlayerStatus]==Aad)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
               
PlayerInRound[playerid]=false;
               
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
              if(
PlayerInfo[playerid][PlayerTeam]==TeamA)             TeamInfo[TeamB][Score]++;
              else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)     TeamInfo[TeamA][Score]++;
            
PlayerInfo[playerid][PlayerStatus]=Waiting,
             
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
      else if(
PlayerInfo[playerid][PlayerStatus]==Tw)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
               
PlayerInRound[playerid]=false;
               
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
              if(
PlayerInfo[playerid][PlayerTeam]==TeamA)             TeamInfo[TeamB][Score]++;
              else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)     TeamInfo[TeamA][Score]++;
            
PlayerInfo[playerid][PlayerStatus]=Waiting,
             
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Tdm)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
            
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
                if(
PlayerInfo[playerid][PlayerTeam]==TeamA)            TeamInfo[TeamB][Score]++,SetSpawnInfo(playerid,0,TeamInfo[TeamA][Skin],ArenaCoord[0]+RandomPOS[random(13)][0],ArenaCoord[1]+RandomPOS[random(13)][0],ArenaCoord[2],ArenaCoord[3],0,0,0,0,0,0);
            else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)   TeamInfo[TeamA][Score]++,SetSpawnInfo(playerid,0,TeamInfo[TeamB][Skin],ArenaCoord[4]+RandomPOS[random(13)][0],ArenaCoord[5]+RandomPOS[random(13)][0],ArenaCoord[6],ArenaCoord[7],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Waiting)
    {
         
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Sub)
    {
        if(
PlayerInfo[playerid][Duel]>0)
        {
            new 
DuelStr[256];
            new 
duelid=PlayerInfo[playerid][Duel];
            if(
killerid != InvalidId)
            {
                 new 
Hp,Float:H,Float:A;
                 
GetPlayerHealth(killerid,H),GetPlayerArmour(killerid,A);
                 
Hp=floatround(H,floatround_round)+floatround(A,floatround_round);
                  
format(DuelStr,MaxString,"(DUEL): \"%s\" Derrotou \"%s\" no /Duel %d (Hp Restante: %d).",PlayerInfo[killerid][PlayerName],PlayerInfo[playerid][PlayerName],duelid,Hp);
                 
PlayerInfo[killerid][PlayerDuelKills]++;
                    
dini_IntSet(PlayerInfo[killerid][PlayerFile],"DuelKills",PlayerInfo[killerid][PlayerDuelKills]);
                 
PlayerInfo[playerid][PlayerDuelDeaths]++;
                 
dini_IntSet(PlayerInfo[playerid][PlayerFile],"DuelDeaths",PlayerInfo[playerid][PlayerDuelDeaths]);
            }
            else
            {
                 
format(DuelStr,MaxString,"(DUEL): \"%s\" Suicidou-se no /Duel %d.",PlayerInfo[playerid][PlayerName],duelid);
            }
            
SetSpawnInfo(playerid,0,GetPlayerSkin(playerid),MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
            
DuelInfos[duelid][Status]=Ending;
            
PlayerInfo[playerid][Duel]=0;
               
SendClientMessageToAll(ServerColor2,DuelStr);
          }
         
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
    }
       return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)