Domino & Notes error

Unexpected: [token]; Expected: [token]

Compile error. The tokens vary, for example Unexpected: End; Expected: Statement.

What it means

The LotusScript compiler found something it didn't expect at that point in the code, so the syntax is wrong.

Common causes

  • A missing End If, Next, Loop or End Select
  • A missing closing bracket or quotation mark
  • Using a reserved word as a variable name

Quick fixes

  1. Look at the line shown and the lines just above it
  2. Check that every block (If, For, Do, Select Case) is closed
  3. Check brackets and quotation marks on the line

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.