Enum of enums
#1

Hello, it's me again on the wrong side of help.
pawn Код:
#define MAX_FOOD 3
new Food[MAX_FOOD];

enum Pancake {
    withMapleSyrup,
    isSweet
}

enum Pizza {
    doubleCheese,
    hasKetchup,
    size,
    drawingOnBox[64]
}

/* Somewhere in code */
{
    Food[0] = (AreFluffy(Unicorns)) ? (Pizza) : (Pancake);
}
This is not valid code - everybody knows unicorns are fluffy. Anyway I get tag mismatch, because the array is tagless and expects integers, not enums. Is there way to somehow group these enums? With something like
pawn Код:
enum FOOD {
    Pancake,
    Pizza
}

//And then
new FOOD:Food[MAX_FOOD];
Food[0] = Pancake;
Food[0][doubleCheese] = true; //Yay!
or something?
I've already tried with weak tags - no results. Thanks for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)