if statement problem with enum value
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not how enums work! You can't define default values like that at the enum level because they don't do what you think. Enums define array slots, so that code will create a 1-cell array with two names for slot 0 (i.e. put all your data in the same place).

You could do:

pawn Код:
enum pMenu (<<= 1)
{
    inVip = 1,
    inAdmin
}
new pMenu:pInMenu[MAX_PLAYERS];
To compress the data. Or, as warcodes_ said there's rBits, or YSI has a bit system (y_bit).
I am not quite understanding what you mean about "You can't define default values", isnt inVip = 1, defining a default value?
lol so confused.
Reply


Messages In This Thread
if statement problem with enum value - by LeetModz - 30.04.2012, 05:10
Re: if statement problem with enum value - by ReneG - 30.04.2012, 05:13
Re: if statement problem with enum value - by LeetModz - 30.04.2012, 05:22
Re: if statement problem with enum value - by warcodes_ - 30.04.2012, 05:28
Re: if statement problem with enum value - by LeetModz - 30.04.2012, 05:39
Re: if statement problem with enum value - by warcodes_ - 30.04.2012, 05:51
Re: if statement problem with enum value - by LeetModz - 30.04.2012, 06:57
Re: if statement problem with enum value - by warcodes_ - 30.04.2012, 07:19
Re: if statement problem with enum value - by LeetModz - 30.04.2012, 07:43

Forum Jump:


Users browsing this thread: 1 Guest(s)