Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: homelightgames on Wed 01/11/2006 22:44:55

Title: setglobalint in global script [SOLVED]
Post by: homelightgames on Wed 01/11/2006 22:44:55
I have a question concerning set global int:

I want to set a global variable (setglobalint) when the game starts, yet putting "setglobalint" in the global script returns a Parse error (Parse  Error: unexpected 'SetGlobalInt')

Global Script:
// main global script file

SetGlobalInt(2,1);

#sectionstart game_start...

Where do you put "setglobalints" to define them at the start of the game?  Is there some syntax I'm forgetting?

thanks

visionmind
Title: Re: setglobalint in global script
Post by: Alynn on Wed 01/11/2006 22:47:16
put it in your game_start function, the reason it's not working now is that it's outside of a function.
Title: Re: setglobalint in global script
Post by: homelightgames on Wed 01/11/2006 23:21:16
That was obvious.  Sheesh.

Thanks for your help Alynn.

visionmind