28.01.2018, 13:22
Hello everyone,
I've wanted to use an int array in an enum, and I got no errors when I compiled. But when in an if statement in somewhere in the code, I used the array to check its value, and then four errors showed up.
I really need to solve this problem, if you have an idea how to fix this thing, then help me fix it, please.
Here's the enum:
Here's the if statement:
And here's the error:
I've wanted to use an int array in an enum, and I got no errors when I compiled. But when in an if statement in somewhere in the code, I used the array to check its value, and then four errors showed up.
I really need to solve this problem, if you have an idea how to fix this thing, then help me fix it, please.
Here's the enum:
PHP код:
enum objectenum
{
created,
objectID,
modelID,
matindex[5]
};
new oInfo[MAX_PLAYERS][MAX_CREATED_OBJECTS][objectenum];
PHP код:
if(oInfo[playerid][i][matindex[0]] == 0)
Код:
C:\Program Files (x86)\SA-MP Server\filterscripts\modpaw.pwn(348) : error 028: invalid subscript (not an array or too many subscripts): "matindex" C:\Program Files (x86)\SA-MP Server\filterscripts\modpaw.pwn(348) : warning 215: expression has no effect C:\Program Files (x86)\SA-MP Server\filterscripts\modpaw.pwn(348) : error 001: expected token: ";", but found "]" C:\Program Files (x86)\SA-MP Server\filterscripts\modpaw.pwn(348) : error 029: invalid expression, assumed zero C:\Program Files (x86)\SA-MP Server\filterscripts\modpaw.pwn(348) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase