[3.2 RC5] Using existing variable name in the struct, declared in asc (not ash)

Started by Crimson Wizard, Sun 25/07/2010 13:42:21

Previous topic - Next topic

Crimson Wizard

If there's a variable of any type declared in module header, like

Code: ags

int var;


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

Code: ags

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.

Pumaman

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.

SMF spam blocked by CleanTalk