05.02.2015, 21:56
It's fairly obvious that it's related to this part;
Why do you use INVALID_PLAYER_ID in one place and 999 in another?
pawn Код:
if(GettingSpectated[playerid] != INVALID_PLAYER_ID) // suppose this contains 999. Obviously not equal to INVALID_PLAYER_ID so this is true
{
new spectator = GettingSpectated[playerid]; // spectator now contains 999
if(!IsPlayerConnected(spectator)) // player 999 does not exist and is therefore not connected so this is also true
{
GettingSpectated[playerid] = 999;
Spectate[spectator] = 999; // 'spectator' is still 999, which is an invalid array index, hence causing the OOB error
}
// bunch of code
}

