09.05.2019, 14:41
im getting an array index out of bounds error.
Codes that you might need..
where im getting array index out of bounds errors:
Code:
F:\Programming\Main\filterscripts\matchmaking system.p(123) : error 032: array index out of bounds (variable "LobbyInfo") F:\Programming\Main\filterscripts\matchmaking system.p(147) : error 032: array index out of bounds (variable "LobbyInfo") Pawn compiler 3.10.6 Copyright © 1997-2006, ITB CompuPhase
pawn Code:
#define MAX_LOBBY 10
enum lobby {
lobbyType,
lobbyState,
gameType,
bool:respawnsEnabled,
minPlayers = 2,
maxPlayers = 6,
playerCount,
startTimer,
endTimer,
lobbyPassword = 0,
}
new LobbyInfo[MAX_LOBBY][lobby];
pawn Code:
if(IsPlayerInLobby(playerid) == 1 && LobbyInfo[lobbyid][lobbyState] == 3)
pawn Code:
switch(LobbyInfo[PlayerInfo[playerid][pLobbyID]][gameType])
{