Scrolling Game Development Kit Forum

SGDK Version 1 => Script => Topic started by: Dr Obvious on 2005-09-20, 11:55:42 PM

Title: Script Time Out Error
Post by: Dr Obvious on 2005-09-20, 11:55:42 PM
So I have my game finished and all, but every now and then I get a random error that I cannot reproduce on will: Script timeout error.

It happens at random places in my game and always in places in the script that have nothing to do with where my game crashed.  Any idea what this error is?
Title: Timeout
Post by: bluemonkmn on 2005-09-21, 05:04:00 AM
A script timeout error occurs if your script ever takes more than 2 seconds to do something (because it's supposed to come back about 60 times a second, GameDev figures if it's taken 2 whole seconds, somethings gone wrong).  If your script legitimately takes more than 2 seconds to do some things, you can increase the timeout by setting HostObj.ScriptTimeOutSeconds to a value greater than 2, or you can set it to 0 to disable script timeout.
Title: Script Time Out Error
Post by: Dr Obvious on 2005-09-21, 03:00:05 PM
where in my script would I set that?
Title: Script Time Out Error
Post by: bluemonkmn on 2005-09-22, 05:38:32 AM
Anywhere before the timeout happens.  You could set it at the top of the file or right before the call to ProjectObj.GamePlayer.Play or in Player_OnPlayInit.