Error 032: Array index out of bounds (variable "SDInfo")
#1

Hello, I am having an annoying issue that I cant figure out how to fix, help would be appreciated.

pawn Код:
enum SCPDInfo
{
    LID,
    LNAME[50],
    LRANK1[20],
    LRANK2[20],
    LRANK3[20],
    LRANK4[20],
    LRANK5[20],
    LRANK6[20],
    LRANK7[20],
    LRANK8[20],
    LRANK9[20],
    LRANK10[20],
    LMEMBERS,
    LMOTD[90],
    LLEADER[MAX_PLAYER_NAME]
};
new SDInfo[SCSD][SCPDInfo];
pawn Код:
format(Qstring, sizeof(Qstring), "SELECT lname FROM scpd WHERE lid = '%d'", SDInfo[SCSD][LNAME], SDInfo[SCSD][LID]);
Код:
error 032: array index out of bounds (variable "SDInfo")
Reply
#2

Where is SCSD defined?
I can see you are using "SDInfo[SCSD][LNAME], SDInfo[SCSD][LID]". That second brackets should contain some ID (like SDInfo[1][LID]), not the defined value of max classes or whatever that is. It would be a simillar mistake to do "PlayerInfo[MAX_PLAYERS][pCash] = 15" where you are trying to asign some value to the index that is out of the array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)