< Back

Document Subject: Illegal Parenthesized reference
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#IllegalParRef or http://A555F9/nn.nsf/ByAlias/IllegalParRef

If you ever get this message when coding lotusscript using a newish script library, it can be annoying.




When saving a form or agent which used a script library I got this error:

Illegal Parenthesized reference at line 57

This is because the compiler cannot find my function which is in my lotusscript script library.

eg

set maildoc = ConstructMail(doc)

gives the error, I need to make sure

use "ScriptLibraryName"

which describes:

Public Function ConstructMail(doc As notesdocument) As notesdocument

is in the (Options) area of the form or button.

 

I find (and if this happens to you, please tell me. 'cos sometimes I think Notes is playing tricks on me) that I put the Use line in and Notes somehow removes it first time of saving.

Another tip is make sure the function is "Public" so it is accessible from outside the script library.

If the script library has changed or is new etc, it can be worth restarting notes to refresh the Cache.