"Error 28 - Out of stack space"
This error occurs if the InterAx code get's stuck in an infinite loop, and is the result of a flag problem. The problem occurs if a flag change causes one or more other flag changes which comes back to a previous flag change in that series of flag changes. Sounds a bit confusing, yes. Here is a basic example of what can cause this:
A responder is set to trigger when Flag 1 = 2. The responder is set to change flag 1 to 2 when triggered. When flag 1 = 2, the responder takes action. When the action calls for changing flag 1 to 2, the responder is triggered again. This repeats itself until the error occurs.
Note that the above example is basic, in that the problem lies solely in one object. Many times the problem is the result of several flag changes in several objects that ultimately come back to a previous flag change in that series of flag changes. The flag changes could be something like: Flag 1 = 3, which changes Flag 10 to 12. This causes Flag 17 to change to 8, which changes Flag 1 to 3 (note that we are back to the beginning of the series of flag changes).
The best way to figure out the cause is to:
- Keep the 'Debugging/Notify Window' turned on, which lists all flag changes as the game is played.
- Examine the properties of all objects in the scene in which the error occurs. Pay close attention to any flag properties (setting or checking of flags), and look for a situation that can cause a looping condition.
- If you can't find the problem just by looking at the properties, go through each property with a flag and UN-CHECK the governing checkbox, thus disabling the flag check or change. Do this for all flag checks or changes in the scene except for one. Run the game and check for errors. If none occur, go back to the editor and one by one, re-enable the flag properties until the error occurs. This should at least narrow the problem down to a particular flag.
In versions 3.1 and higher of the InterAx Player, this error will have a better description and hopefully make it clearer as to exactly which flag caused it.