19.08.2013, 07:56
Quote:
I want to get the size of enum, this is valid but it gives a warning
pawn Код:
pawn Код:
|
hello !
if you using enum you cant use the index as number
you can do this..
pawn Код:
new Test[MAX_PLAYERS][3];
pawn Код:
for (new i = 0; i < test1; i++) // The line 1
{
if (Test[playerid][i] == 1) // The line 2
{
//blabla
}
}
or if you still want the enum you can do like this:
pawn Код:
enum test1
{
bla1,
bla2,
bla3
}
new Test[MAX_PLAYERS][test1];
pawn Код:
for (new i = 0; i < test1; i++) // The line 1
{
new string[100];
format(string, sizeof(string), "bla%d", i + 1);
if (Test[playerid][string] == 1) // The line 2
{
//blabla
}
}