[Ajuda] Run time error 4: "Array index out of bounds"
#1

Meu servidor sempre esta dando isso:
Код:
[debug] Run time error 4: "Array index out of bounds"
[debug] AMX backtrace:
[debug] #0 003da258 in public J_OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at C:\Users\Natan\Desktop\Brasil Top UP!\gamemodes\btu.pwn:69937
[debug] #1 0005fc24 in public abb_OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at C:\Users\Natan\Desktop\Brasil Top UP!\pawno\include\../BTU_Includes/attachment-fix.inc:120
[debug] #2 native CallLocalFunction () from samp03svr
[debug] #3 000430b8 in public OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at C:\Users\Natan\Desktop\Brasil Top UP!\pawno\include\../BTU_Includes/#ds_ac#2.0.inc:413
btu.pwn:69937
PHP код:
        for(new x!= MAX_SOUNDSx++){
        
            if(
SomInfo[x][somCreated] && IsPlayerInRangeOfPoint(playerid1.8SomInfo[x][somX], SomInfo[x][somY], SomInfo[x][somZ]) && SomInfo[x][somID] == playerid){ //AKI NESTA LINHA
            
                
destroyPlayerSound(playerid);
            
                
format(stringsizeof(string), "* %s desligou seu rбdio portбtil."NomePlayer(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PlayerInfo[playerid][pComRadio] = true;
                
SetPlayerAttachedObject(playerid,Slot_Radio,2226,5,0.394999,0.045000,0.027000,-25.299999,-101.699974,0.000000);
                
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0);
                break;
            }
        } 
attachment-fix.inc:120
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        if(
HOLDING(128))
        {
            switch(
GetPlayerWeapon(playerid))
            {
                case 
34..3643:
                {                    
                    
_J_AimedWithValidWeap[playerid] = true;
                    for(new 
0MAX_PLAYER_ATTACHED_OBJECTSi++)
                    {
                        if(
IsPlayerAttachedObjectSlotUsed(playeridi))
                        {
                            new 
BitStream:bs BS_New();
                            
                            
BS_WriteValue(
                                
bs
                                
PR_UINT16playerid
                                
PR_UINT32i,
                                
PR_BOOL0
                            
);  
                            
BS_RPC(bsplayerid113PR_LOW_PRIORITYPR_RELIABLE_ORDERED);
                            
BS_Delete(bs);
                        }
                    }
                }
            }
        }
        
        else if(
RELEASED(128))
        {
            if(
_J_AimedWithValidWeap[playerid])
            {                
                
_J_AimedWithValidWeap[playerid] = false;
                for(new 
0MAX_PLAYER_ATTACHED_OBJECTSi++)
                {
                    if(
IsPlayerAttachedObjectSlotUsed(playeridi))
                    {
                        new 
BitStream:bs BS_New();
                        
                        
BS_WriteValue(
                            
bs
                            
PR_UINT16playerid
                            
PR_UINT32i,
                            
PR_BOOL1,
                            
PR_UINT32_J_AttachmentsEnum[playerid][i][_J_ModelID],
                            
PR_UINT32_J_AttachmentsEnum[playerid][i][_J_Bone],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_OffsetX],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_OffsetY],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_OffsetZ],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_RotX],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_RotY],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_RotZ],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_ScaleX],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_ScaleY],
                            
PR_FLOAT_J_AttachmentsEnum[playerid][i][_J_ScaleZ],
                            
PR_UINT32_J_AttachmentsEnum[playerid][i][_J_MaterialColor1],
                            
PR_UINT32_J_AttachmentsEnum[playerid][i][_J_MaterialColor2]
                        );  
                        
BS_RPC(bsplayerid113PR_LOW_PRIORITYPR_RELIABLE_ORDERED); 
                        
BS_Delete(bs);                            
                    }
                }
            }
        }
    }
    
#if defined J_OnPlayerKeyStateChange
        
return J_OnPlayerKeyStateChange(playeridnewkeysoldkeys);//AKI NESTA LINHA
    #else
        
return 1;
    
#endif

#ds_ac#2.0.inc:413
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
newkeys KEY_CROUCH)
        
fAutoC[playerid] = 0;
        
    if(
GetPlayerState(playerid) == && (newkeys 2048 || newkeys 4096))
    {
        
CallLocalFunction("PlayerCheater","id"playeridPlayer_Joypad);
    }
    return 
CallLocalFunction("abb_OnPlayerKeyStateChange""idd"playeridnewkeysoldkeys); //AKI NESTA LINHA
}
forward abb_OnPlayerKeyStateChange(playeridnewkeysoldkeys); 
Alguйm pode me ajudar por favor.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)