ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > Procedures > Running procedures > Errors and warnings while running a procedure > Warning: Cannot evaluate the expression as an [ANY-maze protocol item]

Warning: Cannot evaluate the expression as an [ANY-maze protocol item]

Description

A number of Events, Actions, and built-in variables in ANY-maze procedures require an extra value or 'parameter' to be specified. For example, the Animal enters zone event requires the zone to be specified; the Set speaker volume action requires the speaker to be specified, and the Duration of sequence built-in variable requires the sequence to be specified.

Usually, you'll set this parameter by simply selecting it from a drop-down list on the item itself, but there will be occasions when you wish to use the result of an expression to specify the parameter.

For example, the following section of a procedure uses a variable, rather than the zone directly, to specify the parameter to an event (You can tell that the :

  

  

Figure 1. This procedure uses a variable called 'Active' as the parameter to the Animal enters zone event. The pink colour and the presence of the button show that it's a variable rather than an ANY-maze protocol item, which would be brown.

For the example in figure 1 to work, the 'Active' variable must previously have been assigned to something that ANY-maze can interpret as a zone. This could be the zone itself, or alternatively, some text that is the name of the zone. Either way, ANY-maze knows that a zone is required and will attempt to evaluate this as the name of a zone. If it can't, then this warning will be generated.

More information

All available zones (and other items from the protocol list) are listed under the Variables tab of the procedure editor, under ANY-maze protocol items.

When the procedure editor is in 'Simple' mode, the Variables tab is not shown. You can switch the procedure editor between Simple view and Full view using the buttons on the ribbon bar.

See also:

 •Errors and warnings while writing a procedure 
 •Errors and warnings while running a procedure 
 •User-defined variables 
 •Built-in variables 

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0545