String problem

Started by Gepard, Sat 03/12/2016 17:31:52

Previous topic - Next topic

Gepard

OK, so I've simply declared a String in my game start global like so:

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


and than in header like so:

Code: ags
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!
Drink up me 'arties! Yo ho!

Crimson Wizard

You cannot export local function variables, only global variables that you declared outside of function.

Gepard

Drink up me 'arties! Yo ho!

SMF spam blocked by CleanTalk