Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Crimson Wizard on Sun 25/07/2010 13:42:21

Title: [3.2 RC5] Using existing variable name in the struct, declared in asc (not ash)
Post by: Crimson Wizard on Sun 25/07/2010 13:42:21
If there's a variable of any type declared in module header, like


int var;


and there is a structure declared in module body, which has a variable of the same name, like


struct A
{
  int var;
};


compiler will treat this as error and will give following message:
"'var' is already defined".

This won't happen if structure is declared in module header, though.
Title: Re: [3.2 RC5] Using existing variable name in the struct, declared in asc (not ash)
Post by: Pumaman on Tue 10/08/2010 17:16:07
Yes, this is a known issue with the script compiler. It's something that might get fixed if I get round to rewriting the script compiler at some point.