Error 5 - Illegal function call

Illegal function call - (%ERR_ILLEGALFUNCTIONCALL) - This is a catch-all error related to passing an inappropriate argument to some statement or function.

There are many things that can cause an Error 5, for example:

·           Trying to set TIME$ to an invalid value.

·           A record number is too large (or negative) in a GET or PUT.

·           Attempting to use the WIDTH# statement on a non-sequential file.

·  The run-time execution of a LET or OBJECT statement failed (see OBJRESULT to obtain an extended error code).