Script Errors

When a script contains one or more errors, the description of the first error is displayed on the Errors sheet after the script is applied. If more errors are present, they are displayed in turn, as each one is resolved.

The script code in which the error was detected and the corresponding line number are also displayed. The highlighted code may be the source of the error or there may be an error earlier in the code, with no inconsistency being detected until the highlighted line.

Always check your code carefully when an error is reported, and if the highlighted line seems correct, check preceding lines for an undetected error.

The following table lists the common or typical script error messages that can be encountered, with an explanation of each. It is not a comprehensive list of errors in JADE code.

Error Message Explanation
Expecting [expression] with Indicates an incomplete line of script logic.
Incompatible types Inconsistent use of JADE types with items; for example, using a non-numeric value (such as a string) with a numeric data item.
Incompatible operand Incorrect or incomplete script logic syntax. The input contains a pair of operands that are not compatible for the operation that is being performed; for example, it is invalid to add a Real value to a Date or to compare a Binary with an Integer by using the < operator.
Unknown identifier Use of an undefined (undeclared) variable or something that the system attempts to treat as an identifier (that is, a value that has meaning to JADE, such as a constant or method name). This is often the result of a spelling error.
Unknown type An incorrect type definition used in the vars statement.
Expecting then Missing then clause at the end of an if instruction line.
Expecting endif Missing endif clause from an if statement.
Method does not return a value The method needs to have a return [value]statement in it.
String delimiter mismatch

Indicates a string literal value with an opening quote mark (either single or double) but without the same closing quote; for example:

string := "hello'
Invalid statement

Use of incorrect script logic syntax. The following is an example of incorrect script syntax.

result = "abc";
 

The following example is the correct script syntax.

result := "abc";
  Note the correct use of the assignment operator.
Non-numeric operand Attempting to perform a numeric operation such as * (multiplication) or + (addition) on an item that is not a number.
Return expression mismatch The type of the item in the return statement is not the same as the defined return type of the script.
This is not allowed in report scripts Use of a JADE language feature that is not allowed in report scripts (for details, see "Script Language Restrictions", earlier in this appendix).