Domino & Notes error

Illegal function call

LotusScript error 5.

What it means

A LotusScript function or statement was called with an argument it can't accept, such as an invalid value or one out of range.

Common causes

  • Passing a negative or zero length to Mid, Left or Right
  • Passing an empty or invalid value to a built-in function
  • Calling a function on an array or Variant of the wrong kind

Quick fixes

  1. Check argument values before the call, especially lengths and positions from InStr
  2. Step through in the debugger to see the actual argument values
  3. Log Erl and the variable values in the error handler

Need a hand with this?

Paste your exact message into What's That Error? for a plain-English explanation, or get in touch. I've been supporting Domino and Notes for 28 years.

Disclaimer

The errors, causes and fixes on this site are carefully researched, drawing on HCL documentation and 28 years of hands-on Domino and Notes experience. Every environment is different, though, and a solution that works in one may not be right for yours. Exact wording can also vary between Domino and Notes versions.

This information is general guidance only and is provided without warranty of any kind. Always back up your data and test changes on a non-production system first. To the extent permitted by law, Bruinsma Services Pty Ltd accepts no responsibility or liability for any loss, damage, downtime or other consequence arising from use of this information. For advice specific to your environment, please contact me.