enums..
#1

Is something like this possible?

pawn Код:
enum pVars
{
                        //snip.
            ClassWeapon [ MAX_CLASSES ] [ MAX_TEAMS ],
                        //snip.
}
Where "MAX_CLASSES" is defined as 3 (0,1,2) and "MAX_TEAMS" is defined as 2 (0,1). It's currently giving me an error

Quote:

my.pwn(130) : error 001: expected token: "}", but found "["

If someone could point me in the right direction, that'd be great.
Reply
#2

enum does not support array 2d's or above, at least i don't know how to make it working.
Reply
#3

Quote:
Originally Posted by leonardo1434
Посмотреть сообщение
enum does not support array 2d's or above, at least i don't know how to make it working.
Alright, thanks anyways.
Reply
#4

Quote:
Originally Posted by 2KY
Посмотреть сообщение
Is something like this possible?

pawn Код:
enum pVars
{
                        //snip.
            ClassWeapon [ MAX_CLASSES ] [ MAX_TEAMS ],
                        //snip.
}
Where "MAX_CLASSES" is defined as 3 (0,1,2) and "MAX_TEAMS" is defined as 2 (0,1). It's currently giving me an error



If someone could point me in the right direction, that'd be great.
You should make different array to hold that. As the above poster said, enumerators doesn't supports multi-dimensional array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)