Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: geork on Sat 01/06/2013 19:25:19

Title: Does anyone know the order in which AGS "starts up"?
Post by: geork on Sat 01/06/2013 19:25:19
Hello Everyone!

Well, after this post (http://www.adventuregamestudio.co.uk/forums/index.php?topic=48323.0), I decided to salvage everything and run by basically making an exact copy of the game bar the music files (since they were obsolete anyway for the project) and get a lovely uncorrupted experience. Unfortunately I receive an illegal exception error on start-up, which I read up can usually be found by commenting out sections of code until I hit what's causing the error.

So I set "check points" (basically, writing into a file, since Display("Blah") can't be used in certain functions) through what I figured would be the start-up procedure, that is:

game_start() (on all scripts)
on_event() (for eEventBeforeFadeIn)
room_Load() (for the room I'm starting in)
room_FirstLoad() (ditto)
room_AfterFadeIn() (ditto)

It appears that the error happens after the end of room_Load() but before room_FirstLoad() and room_AfterFadeIn() - does anyone know what the engine is loading up/executing at that point?

Thanks again!
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: Khris on Sat 01/06/2013 19:34:09
There's not much left; I'd guess at that point the various repeatedly_execute functions are called.
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: geork on Sat 01/06/2013 20:01:06
Hmm, no, it's not them either...

I guess it's an issue with importing things then. I imported both GUIs and Rooms from the previous, so I'll see if making the GUI's from scratch helps (please God, please let it not be rooms!  :-D)

Thanks again!
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: Khris on Sat 01/06/2013 20:05:59
Does it happen if you start the game in another room?
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: geork on Sat 01/06/2013 20:20:53
 Yep, same error.

Could it be AGS having issue with imported rooms? I noticed the editor didn't recognize room 31, but did recognize the others (when importing)... that shouldn't have anything to do with it though...
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: Slasher on Sat 01/06/2013 20:24:56
QuoteCould it be AGS having issue with imported rooms?
I had this problem once. I deleted the problem room, re-imported it and it worked.
Title: Re: Does anyone know the order in which AGS "starts up"?
Post by: geork on Sat 01/06/2013 22:02:46
    Ahh cool, turns out remaking every GUI worked. I guess a good indicator is if the button on the GUI refuses to link to anything. Thanks also for the tip slasher - if things go wrong later on, I'll know what to test. :)

    Case closed!