Reference: Error Messages

Summary

Whenever you work with software, there's a chance that something will go wrong. When this eventually happens, most programs will display an error message to let the user know what happened. This page lists every error message you could encounter when using the batch scripting feature, and how to remedy the situation.

Error Message List

The script file cannot be found.
When running scripts from the command line, there's a chance that the file you specify might not exist. This is usually caused by a typo or other mistake when entering the command line arguments. Check that you typed the file name correctly and try again.

 

There are too many identifiers on this line.
An "identifier" is a command, string, or other parameter. No command takes more than four parameters, so there's something wrong with a line that appears to have five or more of them.

 

A quote symbol may not be used here.
Since " are used to denote the start and end of strings, they may not be used anywhere else, such as the middle of a parameter.

 

Unknown command: COMMAND
The first word on a line must be one of the known commands. If you get this error, check that you're spelling the command correctly. If this line is meant to be a comment, the first word must be REM.

 

COMMAND requires more parameters than you've given.
COMMAND doesn't take this many parameters.
COMMAND takes exactly one parameter.
COMMAND doesn't take any parameters.
These errors result from using too many or too few parameters for a specific command. Either check the command's reference to see what is needed, or check that all strings are properly enclosed by quotes.

 

Unable to call FUNCTION.
The CALL command looks for a line that starts with the DEF command and the same parameter it was given. This error occurs when this DEF-parameter pair cannot be found. Check your spelling of the function's name in both places to make sure they are the same. Capitalization does not matter.

 

JUMP cannot find its matching LABEL.
Your script encountered a JUMP or JUMPIF command, but there was no matching LABEL command within the same function. Check both the LABELs and JUMPs to ensure that you've spelled the name correctly.

 

Attempted to divide by zero.
Some commands use your input as a divisor. If this ends up being zero, an error will be thrown and the script aborted. To prevent this problem, either include code to check that zero is not passed to these commands, or double check how you're calling this command.

 

Parameter value is out of rage.
Certain commands (mostly FILTER. commands) can only accept numbers in a specific range. This error is triggered when they are given values outside of this range, leaving them unsure about what they're supposed to be doing.

 

A stack underflow has occurred.
A stack overflow has occurred.
These errors are thrown when the stack is not used properly. To avoid them, ensure that each PUSH command is matched with a POP command, and vice versa.

 

Function depth has gone too deep.
In order to combat runaway recursion, CALL commands can only be used so many times in a row. To avoid this, ensure that your functions either have an exit condition, or aren't nested within each other as much.

 

Unable to determine AND mask position, aborting.
This can happen when using SPRITE.MERGE_MASKS - if the function is not able to automatically determine where the AND mask is located, it aborts the script rather than guess. The simplest solution is not to pass monochrome images to scripts that call this command.

Project Hosted by
Download Mike\'s Sprite Editor