Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:48 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBASIC Error glossary....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 03:25am 17 Aug 2016
Copy link to clipboard 
Print this post

Hello folks.

Prompted by some comments by some of our newer users of MMBASIC, I have contacted Geoff, and although he is still on holiday, he very kindly took the time to send me a list of all the possible error messages that MMBASIC can throw up at you, so I am working on making a document which will contain a description of each of those errors, and what they mean in "Plain English" for the newer members of our MicroMite family.

The document will include examples of the error in each case where possible. The document will not be anything that special, but perhaps can form the basis of an error glossary that could even be expanded on by those more in the know on certain errors then I, and I think in any form, it will be useful not just for the newbies, but also some of the rest of us too!

This is very much a work in progress, and I will post the file on this thread when I have finished at least a basic(no pun intended - well, maybe just a little!) version of it.

There are 194 different error messages, so this WILL take a little time, even for the first version, but just so those who have asked about this aspect of using MMBASIC know that there is action happening on this behind the scenes.......
Smoke makes things work. When the smoke gets out, it stops!
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 724
Posted: 09:51am 17 Aug 2016
Copy link to clipboard 
Print this post

Thank you Grogster!!!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:38am 17 Aug 2016
Copy link to clipboard 
Print this post

  Grogster said  Prompted by some comments by some of our newer users of MMBASIC, I have contacted Geoff, and although he is still on holiday, he very kindly took the time to send me a list of all the possible error messages that MMBASIC can throw up at you, so I am working on making a document which will contain a description of each of those errors, and what they mean in "Plain English" for the newer members of our MicroMite family........


For those who aren't aware of it, the "Beginning Maximite
Programming and
Interfacing" manual by CircuitGizmos is certainly worth a look.

Even though it's written for the Maximite & Version 4.3, it's still 550 pages of good stuff that's definitely got relevance.

Cheers.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 03:17pm 17 Aug 2016
Copy link to clipboard 
Print this post

Yes indeed - nice one, Phil!

I forgot about that manual that CG wrote, and it is a BEAST.

As to this project, it has been suggested to me in PM's that I break this down into a few sections, then others can work on it.

This is a good idea, and I think what I will do at this point, is get approval from the forums as to the layout of each error description. That way, anyone who wants to submit a definition for any error keeps the same layout so that the entire document has the same "Flow" to it, but several different people could be contributing to the end result - if anyone else wants to help with this, please add your support here to this thread.

Next thing I will do, is publish the full list of error messages here on this thread, so that those who want to take on any of them for descriptions, can do whichever ones they want.

I suggest a very basic text-only format, with nothing more then bold, itallic and underline used - we don't want to have to do a heap of re-formatting. Done this way, I can just copy-and-paste to a master document, and each time I post the update, I can list the commands that have NOT yet been documented - something like that - open to suggestions from the members here as to if they have a better way to do it that I have not thought of.

My idea for a format would be something like:


NUMBER OUT OF BOUNDS.
A reference to a number that is invalid was made in your code on this line.

The interpreter has stopped with this error message, as you have tried to reference an invalid number within a command on this line of your code.

EXAMPLE: PRINT INPUT$(0,#1) - This will throw up this error, because you are trying to print ZERO bytes from the serial port handle #1, when the number MUST be >=1. Zero is not valid, so the code will stop with this error.


Something along those lines, anyway - KISS approach. We don't want complicated formatting, as that just adds to the time needed to compile the document. KISS makes it easy for everyone to read too.

Suggestions?
Comments?
Edited by Grogster 2016-08-19
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 05:02pm 17 Aug 2016
Copy link to clipboard 
Print this post

If you are really bored and looking for something to do,
These are the functions that return "number out of bounds" and what it means for each one:
  Quote  "Number out of bounds"

In INSTR() starting position less than one or greater than 256.

In LEFT$() starting position less than zero or greater than 255.

In RIGHT$() starting position less than zero or greater than 255.

In MID$() starting position less than zero or greater than 255 or length to return is negative or 255.

In TAB(x) x is less than 1 or greater than 255.

In ASIN(x) x is less than -1 or greater than +1

In ACOS(x) x is less than -1 or greater than +1


There are still 'commands', I2C External, MM_Misc, Onewire, PWM, SerialFileIO and MMBasic source files to go through.

Writing a program to scan the source and list the lines with error messages in them is easy but converting the output into plain English (or Nu Zelund) is what takes time.

Jim


VK7JH
MMedit
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:13pm 17 Aug 2016
Copy link to clipboard 
Print this post

  TassyJim said  Writing a program to scan the source and list the lines with error messages in them is easy but converting the output into plain English (or Nu Zelund) is what takes time.

Jim



A program sounds a good idea.

You probably already thought of it but saving its output, however verbose etc it is, would be useful. Then when anyone makes a newer MMBasic the program can be re-run and the differences hint at any new error messages.

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 09:23pm 17 Aug 2016
Copy link to clipboard 
Print this post

Well, here is the list of error messages, where "$" means string, and "%" means number:


$ already declared
$ already declared with a different type
$ not declared
% is invalid (valid is % to %)
% out of bounds
A sub/fun has the same name: $
Already open
Argument list
Array dimensions
Baud rate too high
Cancelled by remote
Cannot change a constant
Cannot continue
Cannot find $
Cannot find a matching FOR
Cannot find label
Cannot find matching END SELECT
Cannot re dimension array
Click option not set
Conflicting variable type
Console baud rate too high
Console pins are in use
Control #% does not exist
CPU speed too low
Display not configured
Divide by zero
DO without LOOP
Duplicate name
Error closing
Expected a number
Expected a string
Expected an array
Expected closing bracket
Expression is too complex
Expression syntax
File number #% is not open
File number is already open
File number is not open
Flash write
Floating point variable required
Font is too large
FOR with misplaced = or TO
FOR without matching NEXT
GUI reference number #% is in use
I2C is busy
IF without THEN
In use by the console
Incompatible type
Incompatible type in argument
Incompatible types in expression
Inconsistent type suffix
Incorrect argument count
Incorrect expression syntax
Incorrect number of arguments
Index out of bounds
Insufficient array size
Insufficient data
Insufficient space in array
Internal fault (sorry)
Invalid 7 bit device address
Invalid address
Invalid argument
Invalid argument count
Invalid character
Invalid character: @
Invalid colour: $
Invalid COM port
Invalid COM specification
Invalid command
Invalid configuration
Invalid constant
Invalid CPU speed
Invalid date
Invalid dimensions
Invalid display type
Invalid eight digit hex word
Invalid file access mode
Invalid file number
Invalid flag combination
Invalid flag specification
Invalid font #%
Invalid font format
Invalid font number #%
Invalid function definition
Invalid function name
Invalid in a program
Invalid inside THEN ... ELSE
Invalid justification
Invalid line number
Invalid mask
Invalid mode
Invalid name
Invalid number of parameters
Invalid operator
Invalid option
Invalid option $
Invalid options
Invalid orientation
Invalid prefix
Invalid size
Invalid speed
Invalid string size
Invalid syntax
Invalid time
Invalid type
Invalid type specification
Invalid variable
Invalid variable name
Invalid variable type
Invalid x coordinate
Invalid y coordinate
Label too long
Landscape only
LCD Panel not configured
Library space occupied
Line is too long
LOCAL invalid here
LOOP has a WHILE test
LOOP has an UNTIL test
LOOP without a matching DO
Missing END declaration
Multiline IF without matching ENDIF
Multiple spaces between keywords
Must be before DIM or LOCAL
Negative argument
No closing bracket
No DATA to read
No DO loop is in effect
No FOR loop is in effect
Not enabled
Not enough data
Not enough initialising values
Not enough memory
Not in interrupt
Not in slave read state
Not in slave send state
Not open
Nothing to return to
Number out of bounds
Number too large
Old and new filenames are the same
Overflow
Pin % is in use
Pin % is invalid
Pin % is reserved on startup
Pin % not input
Pin % not output
Pin % used by ICSP
Pin is in use
Pin is not an input
Pin is not an output
Remote did not respond
RTC not responding
Same colours
Serial port used for the console
Slave enabled
Slave not enabled
SPI is open
SPI2 is in use
SSD1963 display only
SSD1963 display required
String is too long
String too long
Syntax error
Too many concurrent PULSE commands
Too many errors
Too many files open
Too many files to list
Too many initialising values
Too many interrupts
Too many lines
Too many nested DO or WHILE loops
Too many nested FOR loops
Too many nested GOSUB
Too many SUB and FUN
Too many subroutines and functions
Touch hardware
Touch hardware failure
Touch not calibrated
Touch not configured
Touch option not set
Type specification is invalid
Type specification is invalid: @
Type specified twice
Unexpected text
Unexpected text: $
Unknown command
Unrecognised option
Variable name too long
Variable not found
Variable type not specified
Variables already defined
WHILE without WEND
Zero length argument


...rather a-lot of them.....
Smoke makes things work. When the smoke gets out, it stops!
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 10:49pm 30 Aug 2016
Copy link to clipboard 
Print this post

What does Inconsistent type suffix mean?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 04:58am 31 Aug 2016
Copy link to clipboard 
Print this post

For example:
DIM AS INTEGER t$

The $ symbol means that it is a string but it was defined as an integer.

Geoff
Geoff Graham - http://geoffg.net
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 05:46am 01 Jan 2017
Copy link to clipboard 
Print this post

What exactly does "Incorrect argument count" mean?
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:31am 01 Jan 2017
Copy link to clipboard 
Print this post

  lew247 said   What exactly does "Incorrect argument count" mean?


It means the parameters after a command are wrong.

Maybe missing one or there are to many.
 
mobluse

Newbie

Joined: 10/02/2013
Location: Sweden
Posts: 24
Posted: 06:44pm 31 Mar 2018
Copy link to clipboard 
Print this post

Which commands are "Invalid in a program"? I have noticed that Files is. E.g.
10 files
run
[1] Files
Error: Invalid in a program


I thought that Files was useful in a program to select a file by typing it in and it worked in version 2.7A.
Maker Pi Pico Rev1.2, DuinoMite-Mini, Raspberry Pi 0-4, iCE40HX8K, Arduino Uno, VM111, STK500, ZX81
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 10:35pm 31 Mar 2018
Copy link to clipboard 
Print this post

Grogs,
A great initiative!
As a recent editor of a 200 page book with a dozen contributors, may I humbly suggest a simple "style guide" to include font types, sizes, how to treat <tab>, bullets etc. It might help to ensure it is compatible with listing here or in MM manuals.
Even with a guide it quickly becomes time consuming to get it right.
Such a guide might be useful for future TBS initiatives?
Cheers,

Andrew
(The book was for a not-for-profit association, has sold >2500 with all proceeds going to the Association)
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 10:54pm 31 Mar 2018
Copy link to clipboard 
Print this post

Grogs,
Did this ever get off the ground, I notice it was first posted in Aug. 2016.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 11:22pm 31 Mar 2018
Copy link to clipboard 
Print this post

Palcal, I hadn't noticed the dates ( 1) of the post and 2) Today's !!!
Andrew
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:42pm 31 Mar 2018
Copy link to clipboard 
Print this post

No, essentially the concept was dropped cos I had too many other things to do.
If someone wants to pick up where I left off.....
Smoke makes things work. When the smoke gets out, it stops!
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 03:31am 10 Apr 2018
Copy link to clipboard 
Print this post

Hi, where can I get the document as stated?
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 10:35pm 10 Apr 2018
Copy link to clipboard 
Print this post

See my post just above yours.

In other words, this document/project has been abandoned. It is something I would still like to do, but finding the time to do it is the main problem.
Smoke makes things work. When the smoke gets out, it stops!
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 02:57am 11 Apr 2018
Copy link to clipboard 
Print this post

I see..

This document will helps a lot. I wish you all the best!!
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 12:17am 03 Aug 2019
Copy link to clipboard 
Print this post

Poking through 4.5c I get these error messages:

Number out of bounds
All root directory entries are taken
Already open
An internal error was trapped and your program has been lost (sorry).
Array index out of bounds
Array must be dimensioned first
Battery Backed Clock Not Set
CAN not supported in this version
COM port is already open
Cancelled by remote
Cannot access the SD card
Cannot change option more than 9 times - reflash MMBasic to reset
Cannot continue, program changed
Cannot find END SUB or FUN
Cannot find a matching FOR
Cannot find file
Cannot find label
Cannot find or create directory
Cannot find variable
Cannot open file
Cannot re dimension array
Cannot read from file
Cannot rename across drives
Cannot unload this font
Cannot write to file
Cannot write to flash memory
Command not valid on A:
Command table too large
Corrupt file
Corrupt sprite file
DE is invalid
DO without matching LOOP
DS18B20 not responding
Directory not empty
Divide by zero
Error closing communications
Exit and discard all changes (Y/N):
Expected a comma
Expected a number
Expected a string
Expected closing bracket
Expected opening bracket
FILE NOT FOUND
FOR with misplaced = or TO
FOR without matching NEXT
File is read only
File name already exists
File number is already open
File number is not open
Filename must be quoted
Flash memory write failure
Flow control not available
Font is not loaded
Font number is in use
Format specification not found
I2C is busy
IF without THEN
Illegal character in format specification
Illegal character in variable
Incompatible arguments
Incompatible types in expression
Incorrect argument count
Incorrect expression syntax
Incorrect number of arguments
Input line is too long
Insufficient data
Insufficient space in array
Internal fault (sorry)
Invalid 7 bit device address
Invalid COM specification
Invalid Filename
Invalid I/O pin
Invalid Syntax
Invalid address
Invalid argument
Invalid array dimension
Invalid baud rate
Invalid character
Invalid colour
Invalid configuration
Invalid date
Invalid file access mode
Invalid file number
Invalid file or directory name
Invalid flag combination
Invalid flag specification
Invalid font file format
Invalid font file parameters
Invalid font number
Invalid format
Invalid function
Invalid in a program
Invalid input pin
Invalid inside THEN ... ELSE
Invalid line number
Invalid mask
Invalid mode
Invalid number of bits
Invalid number of parameters
Invalid operator in expression
Invalid options
Invalid output pin
Invalid palette
Invalid pin
Invalid scale
Invalid search specification
Invalid speed
Invalid sprite file
Invalid string size
Invalid syntax
Invalid time
Invalid type specification following &
Invalid use of an array
Invalid variable
LINE IS TOO LONG
LOOP without a matching DO
Label is too long
Library not loaded
Library uses line numbers
Line is too long
Line is too long to edit
Local invalid here
MARKED TEXT EXCEEDS 255 CHARACTERS
Matching LOOP also has a WHILE test
Matching LOOP also has an UNTIL test
Mode not valid on A:
Multiline IF without matching ENDIF
Multiple spaces between END SUB
Negative argument to SQR()
No DATA to read
No DO loop is in effect
No FOR loop is in effect
No closing bracket in expression
No error
No function call to return to
No space on media
No variables to read
Not a directory
Not a file
Not enabled
Not enough memory
Not in slave read state
Not in slave send state
Not open
Nothing to return to
Number of colours
Number of dimensions
Number out of bounds
Number out of range
Number too large for an integer
Numeric variable required
OPTION BASE must be before DIM or LOCAL
OUT OF MEMORY
Old and new filenames are the same
Only drive A: is valid
Only one flash file can be accessed at a time
Only one format specifier (%) allowed
Only one internal flash file can be open at a time
PCF8563 not responding
Pin is allocated to a communications function
Pin is in use
Pin is not an input
Pin is not an output
Pin is not configured for output
Pin not configured for input
Pin not configured for output
Program in memory not saved
Remote did not respond
Return from interrupt when not in an interrupt
SD card is write protected
SD card not found
Slave enabled
Slave not enabled
Source and destination are the same
Sprite is in use
Sprite is not on
Sprites already loaded
Sprites not loaded
Stack overflow. Expression is too complex
String is too long
String too long
String variable required
Syntax error
The WATCHDOG command timed out and restarted the processor.
The serial console is already open
This font is in use
Token table too large
Too many SUB and FUN
Too many arguments
Too many concurrent PULSE commands
Too many dimensions
Too many errors in transmission
Too many files open
Too many files to list
Too many nested DO or WHILE loops
Too many nested FOR loops
Too many nested GOSUB
Too many nested sub/function
Too many string expressions
Unexpected text
Unknown command
Unrecognised drive letter
Unrecognised option
Valid in MODE 1,7 only
Variable already Local
Variable name too long
Variable not found
Video is not enabled
WHILE without matching WEND
Write to flash memory failed to verify correctly
Zero length argument

And I'm not sure that all of them count as errors. And some only apply to the internal editor.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025