array index out of bounds
#1

im getting an array index out of bounds error.
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
Codes that you might need..
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];
where im getting array index out of bounds errors:
pawn Code:
if(IsPlayerInLobby(playerid) == 1 && LobbyInfo[lobbyid][lobbyState] == 3)
pawn Code:
switch(LobbyInfo[PlayerInfo[playerid][pLobbyID]][gameType])
{
Reply


Messages In This Thread
array index out of bounds - by SeanDenZYR - 09.05.2019, 14:41
Re: array index out of bounds - by SyS - 09.05.2019, 15:31

Forum Jump:


Users browsing this thread: 1 Guest(s)