What do the run-time script errors mean?
In some cases, GAME.EXE might crash and show you a big red script error. Here is an explanation of each possible run-time script error message. Most of these error messages will never be displayed unless something very serious like file or memory corrution occurs, but a few of them can be triggered by mistakes in scripts.
If you recieve one of the errors other than the first 3, it is recommended you attempt to recompile and reimport your scripts first to fix the error.
[edit] Script buffer overflow
This error message means that the program has run out of memory to load scripts. This can happen if your scripts are really really big, or if you have scripts that fail to terminate piling up in memory and filling up the buffer. Script-debug mode (F10) can be very helpful in diagnosing this error. In the case of a script that is too big, you can break it up into smaller pieces. In case of script stacking up in memory, you need to figure out why the previous scripts are not terminating before the later ones get loaded on top of them. See How do I avoid script buffer overflows? for specific help on this error.
[edit] interpreter overloaded
This error means that the script interpreter has run out of handles to load scripts into. It is very unlikely this error message will ever happen, because any runaway recursive script that could cause this would be more likely to generate a "Script buffer overflow" error first.
[edit] script heap overflow
This error message means that the program has run out of space to store local variables and arguments. It is unlikely you will ever see this error, because any script likely to use that much heap space would probably generate a "script buffer overflow" error first.
[edit] Failed to load (type) script #
This error message is usually preceded by another error message that will give you a clue as to why the attempt to load the script failed. The "type" will tell you how the program was attempting to trigger the script, for example, map-autorun, NPC, after-battle, etc.
[edit] Failed to unlump #.hsx
This error message means that the program tried to run a script, but it could not even find the script's data file in the RPG file. The number indicates the script's ID numbers. High numbers like 32767 are autonumbered scripts.
[edit] division by zero
When I was in school, my teachers would always tell me that it was impossible to divide a number by zero. I always asked "Why not?". It wasnt until college that I found a teacher who was capable of giving me a good answer to that question, and when he did, the answer went right over my head. So I decided to take their word for it. If the math-people of the world say it cannot be done, then I am not going to argue with them.
[edit] stnext encountered noop # at # in #
Stnext is a routine that reads the next command to execute. Noop stands for no-operation. It is an error-catching command to catch errors where script data is missing. The three numbers help pinpoint where the data was missing from. If you see this error it means that either your scripts failed to load, or they have been corrupted on the disk.
[edit] Illegal kind # # in stnext
This error catches corrupted data when trying to read the next command. If you see this error it means that either your scripts have been corrupted, or another script error has thrown the script execution pointer into a part of memory where it should not be.
[edit] encountered clean noop
A clean noop is a deliberate no-operation command that you can put into your script on purpose with the noop command. Of course, I cant think of any valid reasons why you would want to do that.
[edit] Interpretloop encountered noop
Yet another sanity-check to watch for missing data. You may see this if your script fails to load, but you try to continue anyway.
[edit] While fell out of bounds, landed on #
[edit] For fell out of bounds, landed on #
[edit] If statement overstepped bounds
[edit] While statement has jumped the curb
[edit] For statement is being difficult
while, for and if commands keep an internal pointer to control their actions. If this pointer gets corrupted by a bug in the program, you may see one of these error messages, depending on how the number was corrupted.
[edit] Unsupported math
In the unlikely event that I decide to add some new math functions to hamsterspeak, this error would appear to people who where using versions of GAME.EXE too old to support them.
[edit] Illegal statement type
Legal statement types are commands, flow-control, variables, and numbers. If you see this error message it proably means that your script data is corrupt.
[edit] Illegally Suspended Script
This is a sanity check to watch for corrupted script data. If anybody ever sees this, it means either you have found a bug in the program, or the memory for your DOS box was corrupted
[edit] Script # became stateless
Each script has a "state" which tells what operation it is currently doing. If you see this error, it means a script has lost it's state, either because of a bug in the program, or because of a previous error.
[edit] Illegal Wait Substate
This means that a script has been put into a "wait" state on a non-waiting command. If you see this, it probably indicates a bug in the program.
[edit] Script # is in an unsupported format
The script was compiled with a version of HSpeak that GAME.EXE doesn't support. This means you need to upgrade to the latest version to play the game.