For complex Notes applications with a lot of script libraries and code fragments, sometimes it is just a headache to catch that "wild-running" variable.
Effect "Option Explicit" or "Option Declare" in every "Option" events for LotusScript to makre sure all variables used are declared. Make this a standard to follow for your development team.
' Turn off implicit declaration of variables. Option Declare Dim y As Integer y% = 10 ' No error x = 20 ' Compiler error (x has not been declared) ReDim simAry(2, 2) ' No error