Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Gepard on Sat 03/12/2016 17:31:52

Title: String problem
Post by: Gepard on Sat 03/12/2016 17:31:52
OK, so I've simply declared a String in my game start global like so:

Code (ags) Select
function game_start()
{
  String Active;
  export Active;
}


and than in header like so:

Code (ags) Select
import String Active;

It gives me the: "Local variable cannot have the same name as an import" error. These are literally the only occurences of the "Active" String as this is a brand new game and only have few lines of code. Can anyone help?

Thanks!
Title: Re: String problem
Post by: Crimson Wizard on Sat 03/12/2016 18:01:14
You cannot export local function variables, only global variables that you declared outside of function.
Title: Re: String problem
Post by: Gepard on Sat 03/12/2016 18:36:09
Right. Thank you!