Adventure Game Studio | Forums

AGS Support => Advanced Technical Forum => Topic started by: proximity on Tue 12/06/2018 02:03:41

Title: Runtime error
Post by: proximity on Tue 12/06/2018 02:03:41
I get this error message after creating more than 100 module scripts but I'm not sure it's related to that :

https://ibb.co/hcU0OT

Anyone knows this error?
Title: Re: Runtime error
Post by: Crimson Wizard on Tue 12/06/2018 02:08:59
Unless I am mistaken, this means you have over 256 simultaneous scripts running, AGS only supports up to 256 of them now.
"Simultaneous" scripts include all script modules + 1 current room script.

Hmm, don't remember seeing anyone reporting this before.

Does this happen when the game starts, or at some other point?
Title: Re: Runtime error
Post by: proximity on Tue 12/06/2018 02:12:24
Everything is included in 256? Gui functions, module functions, room functions ?

This happens when the game starts.
Title: Re: Runtime error
Post by: Crimson Wizard on Tue 12/06/2018 02:14:03
Quote from: proximity on Tue 12/06/2018 02:12:24
Everything is included in 256? Gui functions, module functions, room functions ?

Not functions, script instances, this is like runtime version of a script module.
How many actual script modules do you have in the project? (Not counting rooms)

The number of instances may be not directly equal to the number of scripts though, but this requires more investigation.
Title: Re: Runtime error
Post by: proximity on Tue 12/06/2018 02:16:41
I have 133 module scripts + 1 global script + 72 GUI. 12 module scripts in repeatedly_execute function.
Title: Re: Runtime error
Post by: Crimson Wizard on Tue 12/06/2018 02:23:02
Quote from: proximity on Tue 12/06/2018 02:16:41
I have 133 module scripts + 1 global script + 72 GUI. 12 module scripts in repeatedly_execute function.

What do you mean by "72 GUI"? Like, actual GUI, or scripts for GUI? Only script modules number is important.

The related part of the engine is quite confusing, but from the quick glance, for some reason AGS creates 2 script instances for each script, and if that's right it means that max script modules that may work at once is 128 (which includes: all script modules + 1 room script).

I may research this more a bit later.
Title: Re: Runtime error
Post by: proximity on Tue 12/06/2018 02:33:17
I meant 72 GUIs with functions but never mind, I get it now. I remember the last working of my game was just before 128 module scripts. I guess I have to combine my present and future scripts to avoid them exceeding 128 in total. Thanks CW.