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:
Attempting 
 to use the WIDTH# statement on a 
	
The run-time execution of a LET or OBJECT statement failed (see OBJRESULT to obtain an extended error code).