[00:09:36] [debug] Run time error 4: "Array index out of bounds" [00:09:36] [debug] Accessing element at index 50 past array upper bound 49 [00:09:36] [debug] AMX backtrace: [00:09:36] [debug] #0 0005d00c in public OnQueryFinish () from am-rp.amx [00:09:37] [debug] Run time error 4: "Array index out of bounds" [00:09:37] [debug] Accessing element at index 49 past array upper bound 48 [00:09:37] [debug] AMX backtrace: [00:09:37] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:38] [debug] Run time error 4: "Array index out of bounds" [00:09:38] [debug] Accessing element at index 49 past array upper bound 48 [00:09:38] [debug] AMX backtrace: [00:09:38] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:39] [debug] Run time error 4: "Array index out of bounds" [00:09:39] [debug] Accessing element at index 49 past array upper bound 48 [00:09:39] [debug] AMX backtrace: [00:09:39] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:40] [debug] Run time error 4: "Array index out of bounds" [00:09:40] [debug] Accessing element at index 49 past array upper bound 48 [00:09:40] [debug] AMX backtrace: [00:09:40] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:41] [debug] Run time error 4: "Array index out of bounds" [00:09:41] [debug] Accessing element at index 49 past array upper bound 48 [00:09:41] [debug] AMX backtrace: [00:09:41] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:43] [debug] Run time error 4: "Array index out of bounds" [00:09:43] [debug] Accessing element at index 49 past array upper bound 48 [00:09:43] [debug] AMX backtrace: [00:09:43] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:44] [debug] Run time error 4: "Array index out of bounds" [00:09:44] [debug] Accessing element at index 49 past array upper bound 48 [00:09:44] [debug] AMX backtrace: [00:09:44] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:45] [debug] Run time error 4: "Array index out of bounds" [00:09:45] [debug] Accessing element at index 49 past array upper bound 48 [00:09:45] [debug] AMX backtrace: [00:09:45] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:46] [debug] Run time error 4: "Array index out of bounds" [00:09:46] [debug] Accessing element at index 49 past array upper bound 48 [00:09:46] [debug] AMX backtrace: [00:09:46] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:47] [debug] Run time error 4: "Array index out of bounds" [00:09:47] [debug] Accessing element at index 49 past array upper bound 48 [00:09:47] [debug] AMX backtrace: [00:09:47] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:48] [debug] Run time error 4: "Array index out of bounds" [00:09:48] [debug] Accessing element at index 49 past array upper bound 48 [00:09:48] [debug] AMX backtrace: [00:09:48] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:49] [debug] Run time error 4: "Array index out of bounds" [00:09:49] [debug] Accessing element at index 49 past array upper bound 48 [00:09:49] [debug] AMX backtrace: [00:09:49] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:50] [debug] Run time error 4: "Array index out of bounds" [00:09:50] [debug] Accessing element at index 49 past array upper bound 48 [00:09:50] [debug] AMX backtrace: [00:09:50] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:51] [debug] Run time error 4: "Array index out of bounds" [00:09:51] [debug] Accessing element at index 49 past array upper bound 48 [00:09:51] [debug] AMX backtrace: [00:09:51] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:52] [debug] Run time error 4: "Array index out of bounds" [00:09:52] [debug] Accessing element at index 49 past array upper bound 48 [00:09:52] [debug] AMX backtrace: [00:09:52] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:53] [debug] Run time error 4: "Array index out of bounds" [00:09:53] [debug] Accessing element at index 49 past array upper bound 48 [00:09:53] [debug] AMX backtrace: [00:09:53] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:54] [debug] Run time error 4: "Array index out of bounds" [00:09:54] [debug] Accessing element at index 49 past array upper bound 48 [00:09:54] [debug] AMX backtrace: [00:09:54] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:55] [debug] Run time error 4: "Array index out of bounds" [00:09:55] [debug] Accessing element at index 49 past array upper bound 48 [00:09:55] [debug] AMX backtrace: [00:09:55] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:57] [debug] Run time error 4: "Array index out of bounds" [00:09:57] [debug] Accessing element at index 49 past array upper bound 48 [00:09:57] [debug] AMX backtrace: [00:09:57] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:58] [debug] Run time error 4: "Array index out of bounds" [00:09:58] [debug] Accessing element at index 49 past array upper bound 48 [00:09:58] [debug] AMX backtrace: [00:09:58] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:09:59] [debug] Run time error 4: "Array index out of bounds" [00:09:59] [debug] Accessing element at index 49 past array upper bound 48 [00:09:59] [debug] AMX backtrace: [00:09:59] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:10:00] [debug] Run time error 4: "Array index out of bounds" [00:10:00] [debug] Accessing element at index 49 past array upper bound 48 [00:10:00] [debug] AMX backtrace: [00:10:00] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:10:01] [debug] Run time error 4: "Array index out of bounds" [00:10:02] [debug] Accessing element at index 49 past array upper bound 48 [00:10:02] [debug] AMX backtrace: [00:10:02] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:10:02] [debug] Run time error 4: "Array index out of bounds" [00:10:02] [debug] Accessing element at index 49 past array upper bound 48 [00:10:02] [debug] AMX backtrace: [00:10:02] [debug] #0 00049b58 in public SetPlayerUnjail () from am-rp.amx [00:10:03] [debug] Run time error 4: "Array index out of bounds" [00:10:03] [debug] Accessing element at index 49 past array upper bound 48 [00:10:03] [debug] AMX backtrace:
forward SetPlayerUnjail();
public OnGameModeInit()
{
AntiDeAMX();
SetTimer("km_counter", 120000, true);
SetTimer("SaveData",300000,1);
SetTimer("MoneyTimer",1000,1);
checkcartimer = SetTimer("CheckCar", 1000, 1);
unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
public SetPlayerUnjail()
{
if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
{
StartingPaintballRound = 1;
SetTimer("PreparePaintball", 15000, 0);
}
for(new i = 1; i <= sizeof(TurfInfo); i++)
{
new string[256];
if(WarInfo[i][wTime] > 0)
{
foreach(Player, x)
{
if(playerVariables[x][pGroup] == WarInfo[i][wAttacker] || playerVariables[x][pGroup] == WarInfo[i][wFaction])
{
new time = WarInfo[i][wTime];
TextDrawShowForPlayer(x, tTimer[x]);
format(string, sizeof(string), "War time: ~y~%s ~w~", CalculeazaTimp(time));
TextDrawSetString(tTimer[x], string);
GangZoneFlashForPlayer(x, Turfs[i], COLOR_RED);
for(new i = 0; i < sizeof(TurfInfo); i++)
|
When you set the size of an array to 49, the valid indexes are between 0 and 48. In SetPlayerUnjail callback, you use 1 to 49 and it goes out of bounds. You also don't need to start from index 1 and 0 goes wasted.
pawn Код:
|