0: (no error)
State of ERRNUM after a program ends without triggering an error.
1: Internal Error
Should never happen.
2: Illegal Instruction
Unknown.
3: Syntax Error
Code can't be interpreted.
4: Illegal function call
An incorrect number of arguments was passed to a function. Sometimes used instead of
Type mismatch or
Out of range.
5: Stack overflow
Call stack is full. (Usually triggered by doing
GOSUB without
RETURN or calling a function within itself.)
6: Stack underflow
Should never happen.
7: Divide by zero
Tried to divide by 0 while code is running or during pre-compilation.
8: Type mismatch
When passing arguments of the wrong type to a function.
9: Overflow
Trying to assign a value to an integer that is too big.
10: Out of range
A value passed to a function is outside the expected range.
11: Out of memory
Not enough unused memory to create/resize a variable.
12: Out of code memory
Unknown.
13: Out of DATA
Tried to read
DATA when there is none left.
14: Undefined label
Tried to
GOTO or
GOSUB to a label that doesn't exist.
15: Undefined variable
A variable was used before it was defined with
VAR or
DIM (or as the input/output to a function).
Only happens in STRICT mode.
16: Undefined function
Tried to
CALL a function that doesn't exist.
17: Duplicate label
There are multiple labels with the same name.
18: Duplicate variable
Tried to
VAR/
DIM a variable that already exists.
19: Duplicate function
Tried to
DEFine a function when one already exists with the same name.
20: FOR without NEXT
21:NEXT without FOR
Note: Within
IF statements,
NEXT is treated as
CONTINUE and won't trigger this error.
22:REPEAT without UNTIL
23: UNTIL without REPEAT
24: WHILE without WEND
25: WEND without WHILE
26: THEN without ENDIF
Note: Only triggered in multiline IF statements
27: ELSE without ENDIF
Note: Only triggered in multiline IF statements
28: ENDIF without IF
29: DEF without END
30: RETURN without GOSUB
31: Subscript out of range
Tried to access an array/string element that doesn't exist.
32: Nested DEF
DEF was used inside a function definition.
33: Can't continue
Tried to use
CONT in direct mode after an error.
34: Illegal symbol string
Passed a string to
GOTO/
GOSUB that is not a valid label.
35: Illegal file format
Unknown.
36: Mic is not available
Tried to use MICSTART while MIC was turned off.
37: Motion sensor is not available
Tried to use ACCEL, GRYOV, GYROA, or GYROSYNC with MOTION turned off.
38: Use PRGEDIT before any PRG function
39: Animation is too long
Tried to pass more than 32 key frames to SPANIM
40: Illegal animation data
41: String too long
A string that is too long was passed to a function.
42: Communication buffer overflow
MPSEND was used too many times in "a short period".
43: Can't use from direct mode
Tried to use a feature in direct mode that isn't allowed.
These are
XSCREEN 4,
USE,
EXEC,
DEF,
RESTORE,
DATA, and
READ.
44: Can't use in program
Tried to use a feature in a program that isn't allowed.
Only triggered by
PROJECT.
45: Can't use in tool program
Unknown.
46: Load failed
Tried to
USE or
EXEC a file that doesn't exist.
47: Illegal MML
http://smilebasicsource.com/page?pid=797
48: Uninitialized variable used
Tried to set a variable to an undefined value.
49: Protected resource
Unknown.
50: Protected file
Unknown
51: DLC not found
Tried to use a DLC command without purchasing the DLC.
52: Incompatible statement
Use a WII U exclusive feature on the 3DS version or vice-versa.
53: END without CALL
END of user DEF encountered without calling it
54: Array is too large
Array saved with SAVE is too large.