12.05.2015, 00:20
Here goes ...Right after I updated my game mode from 0.3z to 0.3.7 and compiled with all the latest plugins and inc's I get this continuous spam > [debug] Run time error 4: "Array index out of bounds" [debug] Accessing element at index 48 past array upper bound 47. [debug] AMX backtrace:[debug] #0 0003084c in public WantedColor () at C:\Users\Robert\Desktop\SA-MP0.3.7\gamemodes\MWCNR.pwn:1707. I dont get it cuz this GM worked seamlessly on 0.3z.(Facepalm). The code that [debug] AMX backtrace points to is> public WantedColor()
{
for (new i; i < MAX_PLAYERS; i++ && gTeam[i] == TEAM_CIV)
{
switch(GetPlayerWantedLevel(i))
{
case 0:
{
SetPlayerColor(i,COLOR_WHITE);
}
case 1 .. 3:
{
SetPlayerColor(i,yellow);
}
case 4 .. 10:
{
SetPlayerColor(i,red);
}
}
}
}
Any help would be greatly appreciated .Thanks.
{
for (new i; i < MAX_PLAYERS; i++ && gTeam[i] == TEAM_CIV)
{
switch(GetPlayerWantedLevel(i))
{
case 0:
{
SetPlayerColor(i,COLOR_WHITE);
}
case 1 .. 3:
{
SetPlayerColor(i,yellow);
}
case 4 .. 10:
{
SetPlayerColor(i,red);
}
}
}
}
Any help would be greatly appreciated .Thanks.