Alan Language Grammar Table of Contents How To Use the System

C COMPILER ERROR MESSAGES

C.1 Format of messages

This appendix describes the error messages generated by the Alan compiler. The compiler presents the messages in the order of occurrence in the file. The offending source line is always shown together with the message. The following example illustrates a typical compiler output.


 
ZILexample.alan

  23.  If barfoo Is foobared Then
====>     1
 *1*   310 E : Identifier 'barfoo' not defined.

  27.      Exit north To Rumble.
====>                    1
 *1*   310 E : Identifier 'rumble' not defined.

  28.      Exit west To Tumble.
=====>                  1
 *1*   310 E : Identifier 'tumble' not defined.

  46.  
====>  1
 *1*   101 E : 'START' 'HERE' '.' inserted.
 *1*   211 E : Adventure must start at a Location.

       5 error(s).
       No detected warnings.
       2 informational message(s).

The following information is available in the compiler listing:

  1. File name
  2. Line number and source text of that line
  3. Message indicator or pointer
  4. Message number and text
  5. Message summary

To change what messages to show and where output is directed refer to the options and their descriptions in Compiler Switches .

C.2 Message explanations

For each message, a short description of the error, possible causes etc. are given. Each message reported also indicates the severity of that error. The message is supplemented with an indication of its severity. An informational message (indicated by an I) simply gives some information to the user, a warning message (W) indicates an error but the compilation still generates a valid output (although not always what the user intended). Error messages (E) indicate errors which have made it impossible to generate any output, but the compiler still continues to process all input. Fatal (F) and system (S) messages always terminate the compilation process immediately.

The message descriptions below may also contain the special insertion markers `%n' (where n is a digit), which indicate that text will be inserted at that point in the message during compile time, e.g. the offending identifier or a file name.

 
100   Parsing resumed here.

A severe syntax error was discovered. Some input was skipped. This error message marks the place where the parsing was restarted.

 
101   %1 inserted.

A syntax error was discovered and one or more symbols inserted in the input in an attempt to recover.

 
102   %1 deleted.

A syntax error was discovered and one or more symbols was skipped from the input in an attempt to recover.

 
103   %1 replaced by %2.

A syntax error was discovered and one or more symbols was replaced by one or more other symbols in an attempt to recover.

 
104   Severe syntax error, construct ignored.

An intricate syntax error was discovered. A complete construct was skipped in an attempt to recover.

 
105   Syntax error, couldn't recover.
 
106   Parse stack overflow.
 
107   Parse table error.
 
108   Parsing terminated.

Alan compiler implementation errors. Should not occur!

 
150   Unterminated STRING.

An opening double quote was not terminated by a closing quote before end of file. Error message points to the opening quote. Remember STRINGs may cover several lines.

 
151   File name missing for $INCLUDE directive.

An include directive was given but no file was indicated. The complete file name must be given according to the rules in Files .

 
198   Could not open output file '%1' for writing.

The indicated output file could not be opened, probably because the directory did not exist or the file or directory was write protected.

 
199   Adventure source file (%1) not found.

The source file given on the command line did not exist. The Alan compiler adds the .alan extension to the file name given, if it did not include a period.

 
201   Mismatched block identifier, '%1' assumed.

The identifier following a terminating END did not match the one given at the beginning of the construct. This indicates an illegal nesting or a missed END IF. The identifier indicates to which block the END is assumed to belong.

 
202   Multiple usage of direction '%1' in this EXIT.
 
203   Multiple definition of EXIT '%1' in this location.

The directional word indicated was used more than once, either in the same, or different exit declaration from the location. This is contradictory and not legal.

 
204   Multiple definition of %1 DEFAULTS. Ignored.

Only one declaration of default attributes per type is allowed. The second declaration is ignored.

 
205   Multiple usage of '%1' in this VERB definition.

When specifying actions for multiple verbs in the same declaration, the indicated word occurred twice.

 
206   Multiple definition of SYNTAX for %1.

More than one syntax definition for the same verb was found. This is an error, remove the offending one.

 
207   VERB '%1' is not defined.

A SYNTAX construct defined the syntax for a verb that was never defined.

 
208   '%1' is not a VERB.

The identifier on the left hand side of a SYNTAX definition was defined as something that was not a VERB.

 
209   First element in a SYNTAX must be a player word.

The definition of a SYNTAX may not start with a parameter. The first word must be a player word so as to distinguish it from other forms of input.

 
210   Action qualification not allowed here.

The BEFORE, AFTER and ONLY qualifiers may not be used for a DOES-clause in this context.

 
211   Adventure must start at a Location.

You specified a where expression in the START section that did not specify an explicit location. The start section specifies where the hero starts and must be a LOCATION .

 
212   Syntax parameter '%1' overrides symbol.

The SYNTAX definition valid in this context defined a symbol which is the same as an entity (object, location or actor). The syntax parameter will take precedence.

 
213   Verb alternatives not allowed here.

You may only specify different verb body alternatives within objects. The global verb body and the verb body in the location may not have alternatives.

 
214   Parameter not defined in syntax for '%1'.

The identifier given as the selector in a verb body alternative was not defined in the syntax for that verb.

 
215   Syntax not compatible with syntax for '%1'.

To be able to use the same body for different verbs by supplying them in a comma separated list in the verb header they must all be compatible. This means that they have the same number of parameters and the parameters have the same names. Otherwise conflicts will arise when figuring out which parameter to use.

 
216   Parameter '%1' multiply defined in this SYNTAX.

The parameter was defined more than once in the same SYNTAX definition.

 
217   Only one multiple parameter allowed for each syntax.
This one ignored.

To be able to use multiple parameters in a player command only one parameter may be marked as referring to multiple objects or actors using ALL or conjugations. This is a warning, the syntax will be as if the first multiple marker was the only one.

 
218   Multiple definition of attribute '%1'.

The indicated attribute name was defined more than once in the same context (default attribute list or within the same entity). Remove one definition.

 
220   Multiple definition of '%1'.

The indicated word has multiple, and possibly different, definitions.

 
221   Multiple class restriction for parameter '%1'.

The same parameter occurred more than once in the list of class restriction in the same SYNTAX definition.

 
222   Identifier '%1' in class definition is not a parameter.

Only the parameters in the syntax may be referenced in the class restricting clause of a SYNTAX definition.

 
230   No syntax defined for this verb, assumed '%1 (object)'.

This message is a warning to indicate that the default syntax handling has been used.

 
310   Identifier '%1' not defined.

The indicated word was never defined. It must be declared as either a location, an object, a container, an actor or an event.

 
311   Must refer to %1.

The construct indicated does not refer to the correct kind of item, the message indicates which kind of item was expected.

 
312   Parameter not uniquely defined as %1, which is required.

In certain contexts it is necessary to refer to a particular type of entity, e.g. the IN expression must refer to a container or an object with the container property. If the reference (the what part) is a parameter identifier, this parameter must be restricted to be of the required type by use of parameter restrictions (such as `WHERE c ISA CONTAINER').

 
315   Attribute not defined for '%1'.

The indicated attribute is not defined for the particular object, location or actor. It must either be a default attribute or be locally declared.

 
318   Entity '%1' is not a Container.

The referenced entity (object or actor) was not declared to have the container property, although the context required a container.

 
320   Word '%1' belongs to multiple word classes (%2 and %3).

A word was declared as to belong to different word classes such as noun, verb, adjective etc. Only such multiple declarations which may lead to unexpected behaviour is reported, usually because of limitations in the current implementation. Generally it is allowed to declare a word e.g as both an adjective and a noun.

 
321   Synonym target word '%1' not defined.

To define a synonym its target word (the word on the left side of the equal sign) must be defined as a proper word elsewhere in the source.

 
322   Word '%1' already defined as a synonym.

A word may not be declared as a synonym for different target words.

 
330   Wrong types of expression. Must be of %1 type.

In an expression, a value or an expression was used that had a type that was not allowed. The message indicates the correct type.

 
331   Incompatible types in %1.

The two values in an expression with a binary operator did not have compatible types, or the value used in a SET statement was not type compatible with the referenced attribute.

 
332   Type of local attribute must match default attribute.

An attribute declared locally (within an object, actor or location) that has the same name as a default attribute, has to have the same type (boolean, integer or string).

 
333   The word '%1' is defined as a synonym as well as of
another word class.

Synonyms must be words not defined elsewhere.

 
400   Script not defined for Actor '%1'.

No script with the indicated identity was defined for the actor.

 
401   Actor reference required outside Actor specification.

Inside an actor specification it is permissible to leave out the actor reference in a USE statement in which case the surrounding actor is assumed. Outside actor specifications, the actor reference must always be supplied.

 
402   An Actor can't be inside a Container.

The LOCATE statement tried to locate an actor inside a container. This is not allowed.

 
403   Script number multiply defined for Actor '%1'.

The indicated number was used for more than one script for the same actor.

 
404   Attribute to %1 must be a default attribute.

To reference attributes for OBJECT , LOCATION and ACTOR the attribute used must be a default attribute, as all objects, locations or actors must have it.

 
405   The class of a parameter used in %1 must be uniquely defined.

In some statements the class of the identifier must be determined during compile time. This is, for example, the case in MAKE and SET statements.

 
406   A parameter defined as Container have no default attributes.

A parameter that was restricted to containers do not have any default attributes. Actors, objects and locations have separate sets of default attributes. In order to refer to an attribute on a parameter it must be restricted to one of these classes. If the parameter also requires the container property, use CONTAINER ACTOR or CONTAINER OBJECT .

 
407   Attribute in LIMITS must be a default attribute.

All objects must have the attribute that a limit is to test.

 
408   Attributes in %1 must be of boolean type.

The attribute referenced in the indicated context must be a boolean attribute.

 
409   No parameter defined in this context.

No parameter is defined in the context where a reference to OBJECT was made. Parameters are only defined within checks and bodies of verbs, so the use of OBJECT (an obsolete construct, use the parameter identifier instead) is also restricted to those contexts. See Run-time Contexts .

 
410   A parameter may not be used in %1.

In certain statements a parameter may not be used at all.

 
411   %1 ignored for Actor 'hero'.

It is allowed to redefine the predefined actor HERO (the player) which makes it possible to define local attributes and descriptions for the hero. However any definition of scripts or initial location is ignored (the script is supplied by the player in his input and the initial location is defined in the START section).

 
412   'ACTOR' is not allowed inside events.

In events no actor is active. This means that no reference to the active actor using ACTOR can be made.

 
413   Expression in %1 must be of integer type.

The context required a numeric expression.

 
414   Invalid initial location for %1.

The initial location specified was not valid.

 
415   Invalid Where specification in %1 statement.

The statement indicated does not allow the where specification used.

 
416   Interval of size 1 in RANDOM expression.

This message informs that the interval in a RANDOM statement was just one single value, resulting in always returning the same value. Not very random.

 
417   Comparing two constant entities will always yield the same result.

The expression compared two identifiers none of which was a parameter. This will always give the same result. This is probably an error, but the message is still a warning as it gives a perfectly running adventure (but, perhaps not what you intended?).

 
418   Aggregate is only allowed on integer type attributes.

The aggregates MAX and SUM can only perform their calculation on integers.

 
419   Expression in %1 must be of integer or string type.

In the indicated context only integer and string type expressions may be used.

 
501   LOCATION '%1' has no EXITs.

In case the hero is located at the indicated location he may not be able to escape from that location. This may be intentional (as for a limbo location or a location with magic words to use as an escape) but the warning is presented as a reminder.

 
600   Multiple use of option '%1', ignored.

The indicated option was used more than once, this occurrence is ignored and the previous setting used.

 
601   Unknown option, '%1'.

A word was given in the option section that was not the name of an option.

 
602   Illegal value for option '%1'.

The indicated option does not allow the value used.

 
997   SYSTEM ERROR: %1

A severe implementation dependent error has occurred (a bug!). Please report.

 
998   Feature not implemented in %1.

The combination of some syntactically correct but semantically tricky constructs are not yet implemented. Please report.

 
999   No Adventure generated.

When an error is detected this informational message is given to indicate that no executable adventure was output.

Alan Language Grammar Table of Contents How To Use the System