Run time error 4: "Array index out of bounds"
#6

Do you use the version 4.13? If it's a very old version, that's why it may not print more info. By the way, I've found few parts that you use killerid inside arrays but you don't check if the killerid is a connected/valid player.

pawn Код:
if(reason >= 0 && reason <= 46)
        {
            new weapon[24];
            PlayerInfo[killerid][pKills] += 1;
            PlayerInfo[playerid][pDeaths] += 1;
            if(PlayerInfo[killerid][pPaintTeam] == 1)
            {
                if(PlayerInfo[killerid][pPaintTeam] == PlayerInfo[playerid][pPaintTeam])
                {
                    PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamRedKills] -= 1;
                    PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamBlueKills] += 1;
                    SetPlayerHealth(killerid, 0);
                    PlayerInfo[killerid][pKills] -= 2;
                    PlayerInfo[killerid][pDeaths] += 1;
                    PlayerInfo[playerid][pDeaths] -= 1;
                    SendClientMessageEx(killerid, COLOR_WHITE, "You have been warned, do not team-kill!");
                }
                else
                {
                    PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamRedKills] += 1;
                    PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamBlueDeaths] += 1;
                }
            }
            if(PlayerInfo[killerid][pPaintTeam] == 2)
            {
                if(PlayerInfo[killerid][pPaintTeam] == PlayerInfo[playerid][pPaintTeam])
                {
                    PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamBlueKills] -= 1;
                    PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamRedKills] += 1;
                    SetPlayerHealth(killerid, 0);
                    PlayerInfo[killerid][pKills] -= 2;
                    PlayerInfo[killerid][pDeaths] += 1;
                    PlayerInfo[playerid][pDeaths] -= 1;
                    SendClientMessageEx(killerid, COLOR_WHITE, "You have been warned, do not team-kill!");
                }
                PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamBlueKills] += 1;
                PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamRedDeaths] += 1;
            }
pawn Код:
if(PlayerInfo[killerid][pAdmin] < 2)
    {
        if(reason == 49)
        {
            format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just car-rammed %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
            ABroadCast(COLOR_YELLOW, string, 2);
            print(string);
        }
        if(reason == 50)
        {
            if(IsAHelicopter(GetPlayerVehicleID(killerid)))
            {
                format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just blade-killed %s (ID %d).", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
                ABroadCast(COLOR_YELLOW, string, 2);
                print(string);
            }
            else
            {
                if(GetPlayerWeapon(killerid) != 32 || GetPlayerWeapon(killerid) != 28 || GetPlayerWeapon(killerid) != 29)
                {
                    format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just car-parked %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 2);
                    print(string);
                }
                else
                {
                    format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just driver-shot %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
                    ABroadCast(COLOR_YELLOW, string, 2);
                    print(string);
                }
            }
        }
    }
Fix those and if it doesn't crash anymore, then that's the problem. Else we'll have to debug it manually (unless crashdetect gives some extra info).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)