Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Mon 15/03/2004 14:05:24

Title: #define invitem
Post by: Radiant on Mon 15/03/2004 14:05:24
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.
Title: Re:#define invitem
Post by: RickJ on Mon 15/03/2004 14:16:46
EGO is a #define constant itself and  #define's are not evaluated recursively.

Title: Re:#define invitem
Post by: Radiant on Mon 15/03/2004 15:19:05
Okay. So what is it defined to, then I can do the recursion myself.
Title: Re:#define invitem
Post by: Pumaman on Mon 15/03/2004 20:22:12
EGO will be #defined as the character number of the EGO character - if it's the first character, this will be 0.