This is a bug that Menderbug reported to me for Pattern:Script, but it occurs that it also happen in PuzzleScript in a slightly different form. When a property on the right-hand side of a rule is ambiguous, the rule is compiled further anyway and it causes an exception TypeError: z is undefined to be displayed in the console. Since in Pattern:Script the consequence is to throw instead an additional error message about the property not being assigned to a layer, I guess the exception is thrown in RulesToMask when accessing the layer.
Here is a minimal code to reproduce the issue:
OBJECTS
Background
black
Player
blue
A
green
B
red
LEGEND
C = A or B
SOUNDS
COLLISIONLAYERS
A
B
RULES
right [ C | C | ] -> [ C | C | C ]
WINCONDITIONS
LEVELS
This is a bug that Menderbug reported to me for Pattern:Script, but it occurs that it also happen in PuzzleScript in a slightly different form. When a property on the right-hand side of a rule is ambiguous, the rule is compiled further anyway and it causes an exception
TypeError: z is undefined
to be displayed in the console. Since in Pattern:Script the consequence is to throw instead an additional error message about the property not being assigned to a layer, I guess the exception is thrown inRulesToMask
when accessing the layer.Here is a minimal code to reproduce the issue: