Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Mon 21/10/2013 00:46:08

Title: SOLVED: close_save_game_dialog(); error
Post by: Slasher on Mon 21/10/2013 00:46:08
Hi,

under what conditions would this bring up an error:
Code (ags) Select
close_save_game_dialog();

GlobalScript.asc(411): Error (line 411): Undefined token 'close_save_game_dialog'


Saves are not being saved with each new game and only 1 save can be made.





Title: Re: close_save_game_dialog(); error
Post by: Khris on Mon 21/10/2013 07:24:04
The function is defined in line 170 in the global script.
So calling it anywhere from line 1 to 169 would create that error.

If you want to use this function "earlier", just move it up in the script, since functions have to be declared "before" they're used.
Title: Re: close_save_game_dialog(); error
Post by: monkey0506 on Mon 21/10/2013 08:18:30
Quote from: Khris on Mon 21/10/2013 07:24:04since functions have to be declared defined "before" they're used.

Fixed that for you. ;)
Title: Re: close_save_game_dialog(); error
Post by: Khris on Mon 21/10/2013 10:15:20
(http://www.adventuregamestudio.co.uk/forums/Themes/AGSCompact/images/post/thumbup.gif)
Title: Re: close_save_game_dialog(); error
Post by: Slasher on Mon 21/10/2013 10:51:43
Sorry guys and thanks a bunch.

I misread the lines.

Thanks very much.

(nod)