Compiler Error Messages

The following table includes all the syntax error messages that the APL compiler (Aplc.exe) can generate. Where necessary, the table provides a description of the error message.

Error message Description
Division by 0.
Duplicate label "%s". This line is the second (or more) line that defines a label %s:, where %s represents the actual label name.
Duplicate variable name "%s". This variable has already been declared; %s represents the actual variable name.
ELSE with no IF.
ELSEIF found after ELSE.
ELSEIF without matching IF.
ENDIF with no IF.
ENDWHILE with no WHILE.
Extra characters on line. The compiler found what appeared to be a valid command, but there were additional characters remaining after compilation was complete. This can be a confusing error because an error in the first part of the line can appear as a different command to the compiler.
FOR at line %d has no NEXT %s. %d represents the line number where the For command was found and %s represents the control variable in the For command.
GOSUB expected. An OnCrash, OnStall, or OnKey command is missing the GoSub keyword.
IF at line %d has no ENDIF. %d represents the line number of the If command.
Illegal character "%c". %c represents the illegal character.
Illegal character. The line contains a non-ASCII character.
Invalid coverage for this cloud type. The coverage keyword is not valid for the type of clouds specified in this Clouds command. See the Clouds Command topic for details.
Invalid number. The line contains a string when the compiler expected a number, and it could not be evaluated. For example, more than one decimal point in a number would cause this error.
KEYPRESS expected. The keypress parameter is missing from the Wait command. This error occurs when the compiler finds a time value and a comma, and then either the end of the line or something other than the keypress parameter. This error is also returned if the parameter is misspelled.
Key specification expected. The KV( ) function didn't understand its argument. See the Key Value Specification topic for details.
Keyword expected. The compiler found something other than a word when a keyword was expected. This error can be caused by a punctuation error.
Label name expected. The compiler found something other than a word when it expected a label name. This error can be caused by a punctuation error or an error in the label name. Label names must start with a letter and can contain only letters, digits, and underscores.
Line too long. Lines can't be longer than 255 characters (not counting the carriage return/linefeed characters).
Missing ")". This line has more opening parentheses than closing parentheses.
Missing label "%s" referenced at line %d. A GoTo, GoSub, OnCrash, OnStall, or OnKey command on line %d (where %d represents the line number) referenced a label named %s (where %s represents the actual name of the label), but no label by that name was found. Check for spelling errors in both the reference to the label and the definition.
NEXT variable does not match FOR. The variable specified in the For command must match the variable specified in the Next command. This error can be caused by a missing Next command or a spelling error.
NEXT without matching FOR.
Only one TITLE per adventure.
Operand expected. The compiler couldn't find an expected operand (a variable, a number, or an expression in parentheses). This error can be caused by a punctuation error, two operators in a row, or a line ending in an operator.
Quoted string expected. This command expects a string in quotation marks. This error can be caused by leaving out the quotation marks.
String expected. A Declare <variable> = statement was followed by something other than a quoted string.
String in KV must be1 character long. If the argument for KV( ) is a quoted string, it must be only one character. See the Key Value Specification topic for details.
Syntax error. This error can be caused by punctuation errors.
System variable name"%s" reused. The variable name %s is one of the predefined Flight Simulator variables or functions. %s represents the actual variable name.
THEN expected.
TITLE too long (limit is %d characters). The length limit is 63 bytes.
TO expected.
Two ELSEs with same IF.
Unbalanced quotation marks.
Unknown key name "%s". The KV( ) function doesn't recognize %s as a key name. %s represents the actual string.
Unrecognized command "%s". %s represents the unrecognized command name. Check the spelling.
Unrecognized keyword "%s". %s represents the unrecognized keyword. Check the spelling.
Undeclared variable "%s". %s represents a variable that is not predefined and has not been declared. Variables must be declared before they are used. Check the spelling.
Variable name expected. The compiler failed to find a variable name. This error can be caused by a punctuation error or an ill-formed variable name. Variable names must start with a letter and can contain only letters, digits, and underscores.
WHILE at line %d has no ENDWHILE.
"(" expected.
")" expected.
"," expected.
"=" expected.
TRUE or FALSE are
reserved keywords. TRUE and FALSE are built-in constants and can't be declared as variables.