? List of Errors ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Another contest? You asked for it!

List of Errors

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.
Author
12Me21
Updated
Rating
3 votes
Categories
Keywords
  • Error
  • secret
  • internal
  • illegal
  • syntax
  • stack
  • overflow
  • underflow
  • type
  • mismatch
  • range
  • memory
  • code
  • data
  • undefined
  • subscript
  • symbol
  • format
  • available
  • buffer
  • uninitialized
  • protected
  • dlc
  • tool
  • fail
4 Comment(s) snail_ snail_ Power User Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Second Year My account is over 2 years old Website Please add error 49: Protected resource 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself You asked me to remove it a while ago lol 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I added (untested) examples for most errors I suspect that stack underflow NEVER happens, since it should be detected as one of the _ WITHOUT _ errors. Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Error 43 (Can't use from direct mode) <direct mode> XSCREEN 2 OK DISPLAY 1 Can't use from direct mode(DISPLAY) Error 44 (Can't use in program) <edit mode> NEW <direct mode> RUN Syntax error in 0:1 Error 31 (Subscript out of range) <edit mode> DIM ARRAY[5] FOR I=0 TO 5 ARRAY[I] = I ?ARRAY[I] NEXT <direct mode> RUN 0 1 2 3 4 Subscript out of range in 0:3 OK Error 7 (Divide by 0) <direct mode> ?1/0 Divide by zero OK Error 15 (Undefined variable) <edit mode> OPTION STRICT VAR A VAR B A=3:B=5 ?A ?B C = A + B ?C <direct mode> RUN Undefined variable in 0:7 It's a compiler error, not runtime