Warning: Vehicle X was not deleted.
20:20:49] [debug] Run time error 4: "Array index out of bounds" [20:20:49] [debug] Accessing element at index 1000 past array upper bound 999 [20:20:49] [debug] AMX backtrace: [20:20:49] [debug] #0 001459fc in public AB_OnPlayerDeath (playerid=119, killerid=17, reason=24) at D:\server\gmi.pwn:24084 [20:20:49] [debug] #1 0001fbf0 in public OnPlayerDeath (playerid=119, killerid=17, reason=24) at D:\server\pawno\include\OPA.inc:71
public OnPlayerDeath(playerid, killerid, reason) { g_abLastTick[playerid] = gettime() + 3; #if defined AB_OnPlayerDeath AB_OnPlayerDeath(playerid, killerid, reason); #endif return 1; }
return 1;
I'm not aware of the cause of your problem but for the run time error 4, you'll need to post line 24084 from gmi.pwn file and few lines before and after that line. Seeing the upper bound to be 999, it is most likely a player-array (MAX_PLAYERS is defined as 1000) and you probably use a loop with "... <= MAX_PLAYERS". I can't be sure though unless you post the code.
|
if(killerid != 255) { if(GetPlayerState(killerid) == 2) { SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Kill!"); return 1; } } if(PlayerData[playerid][pGroup] == 7 || PlayerData[playerid][pGroup] == 10 || PlayerData[killerid][pGroup] == 7 || PlayerData[killerid][pGroup] == 10) { foreach(Player, x) { if(PlayerData[x][pGroup] == 7 || PlayerData[x][pGroup] == 10) { SendDeathMessageToPlayer(x, killerid, playerid, reason); } } if(PlayerData[killerid][pRKills] < 30) { PlayerData[killerid][pRKills] += 1; } PlayerData[playerid][pMoney] -= 500; PlayerData[killerid][pMoney] += 500; }
if(PlayerData[playerid][pGroup] == 7 || PlayerData[playerid][pGroup] == 10 || PlayerData[killerid][pGroup] == 7 || PlayerData[killerid][pGroup] == 10)
[09:56:40] [debug] Run time error 4: "Array index out of bounds" [09:56:40] [debug] Accessing element at index 43 past array upper bound 42 [09:56:40] [debug] AMX backtrace: [09:56:40] [debug] #0 000f1104 in public IsPlayerInTurf (playerid=52, turfid=43) at D:\server\4iulie\gmi.pwn:18125 [09:56:40] [debug] #1 0014a448 in public AB_OnPlayerDeath (playerid=52, killerid=29, reason=29) at D:\server\gmi.pwn:24476 [09:56:40] [debug] #2 0001fbf0 in public OnPlayerDeath (playerid=52, killerid=29, reason=29) at D:\server\pawno\include\OPA.inc:71
for(new i = 0; i <= sizeof(TurfInfo); i++)
{
if(IsPlayerInTurf(playerid, i))
{
new string[144];
if(WarInfo[i][wTime] > 0)
{if(i == i)
{
if(IsPlayerInTurf(playerid, i))
public IsPlayerInTurf(playerid, turfid)
{
if(turfid == -1)
{
return 0;
}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
{
return 1;
}
return 0;
}
if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
new TurfInfo[43][zInfo];
for(new i = 0; i <= sizeof(TurfInfo); i++)
for(new i = 0; i < sizeof(TurfInfo); i++)
forward Theft(playerid);
public Theft(playerid)
{
if(PlayerData[playerid][pTheftA] < 1000)
{
if(PlayerData[playerid][pWarrants] + 1 > 6)
{
PlayerData[playerid][pWarrants] = 6;
SetPlayerWantedLevel(playerid, 6);
}
else
{
PlayerData[playerid][pWarrants] += 1;
SetPlayerWantedLevel(playerid, PlayerData[playerid][pWarrants]);
}
new szTargetName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szTargetName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "Dispecer: %s (%d)have wanted: 'theft'. Reporter: %s (%d). Wanted: +1 | Wanted Level: %d", szTargetName, playerid, PlayerData[PlayerData[playerid][pTheftA]][pNormalName], PlayerData[playerid][pTheftA], PlayerData[playerid][pWarrants]);
sendDepartmentMessage(COLOR_RADIOCHAT, szMessage);
PlayerData[PlayerData[playerid][pTheftA]][pTheft] = 1000;
PlayerData[PlayerData[playerid][pTheftA]][pThefted] = 0;
PlayerData[playerid][pTheftA] = 1000;
}
return 1;
}