#define invitem

Started by Radiant, Mon 15/03/2004 14:05:24

Previous topic - Next topic

Radiant

I put the following code in my header:

#define invitem character[EGO].activeinv

Now whenever I reference 'invitem', the compiler gives an error:
unknown variable: EGO

Is this a limitation of #define? I thought EGO was an internal variable.

RickJ

EGO is a #define constant itself and  #define's are not evaluated recursively.


Radiant

Okay. So what is it defined to, then I can do the recursion myself.

Pumaman

EGO will be #defined as the character number of the EGO character - if it's the first character, this will be 0.

SMF spam blocked by CleanTalk