Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Wonkyth on Mon 02/02/2009 11:51:04

Title: GlobalVariables Error
Post by: Wonkyth on Mon 02/02/2009 11:51:04
I made a Boolean variable in the globalvariables section, but when I tried to test my game I got this Error Message:

Error (line 1): Expected integer value after "="     _GlobalVariables.asc       1


I have absolutely no idea how to fix something like that.
I even tried looking for a globalvariables.asc script file in the directory, so I could open it and see if I could fix it manually.

Anyone know whats going on here?

thanks
Title: Re: GlobalVariables Error
Post by: Matti on Mon 02/02/2009 13:46:39
Can you post the relevant script where the variable is used?

And did you create the variable via the global variable's pane?
Title: Re: GlobalVariables Error
Post by: Khris on Mon 02/02/2009 17:47:17
I think _GlobalVariables.asc is an automatically created script containing the declarations set up in the Global variables pane.
I've tried creating both an int and a bool with no default value assigned and it did compile fine in both cases.
This could be a fix though since I tested this using the latest beta.
Title: Re: GlobalVariables Error
Post by: Pumaman on Mon 02/02/2009 19:25:57
What did you name the variable? Try changing its name and see if that helps.
Title: Re: GlobalVariables Error
Post by: Wonkyth on Tue 03/02/2009 00:18:37
I tried deleting, renaming, changing and a few others.
Might have to get the new beta, or just use ordinary variables...
Title: Re: GlobalVariables Error
Post by: Khris on Tue 03/02/2009 02:21:44
Could you open the Global vars pane, make a screenshot and upload it for us to take a look at?
Title: Re: GlobalVariables Error
Post by: Pumaman on Tue 03/02/2009 20:49:24
Yeah, there are no known bugs with the Global Variables screen, so whatever problem you've uncovered, I'd like to know more about it. A screenshot of the global vars pane when you're having this problem would be really useful.
Title: Re: GlobalVariables Error
Post by: Wonkyth on Wed 04/02/2009 01:38:36
Problem.
It's on my other computer.
I can't connect them and I don't own a memory stick.
sorta no can do... :(
Title: Re: GlobalVariables Error
Post by: Pumaman on Wed 04/02/2009 18:27:08
Ah, I've managed to replicate it now.

The problem happens if you type "True" or "False" (ie. with a capital 'T' or 'F') for the default value.

Type "true" or "false" instead and it will work.

I'll get this fixed.
Title: Re: GlobalVariables Error
Post by: Wonkyth on Fri 06/02/2009 09:57:50
Okay