This doesn't compile because "player" is a global variable.
It looks like actions in table entries (and other compile-time stored-action declarations) must not have variables. The compiler should detect this and complain. For the particular case of "the player" in an action, it might suggest leaving the argument off ("examining the desk") or replacing it with "yourself".
(In a rule body, "the action of the player examining the desk" is legal because the variables are immediately resolved to constants, e.g. "yourself".)
Steps to reproduce :
The Kitchen is a room.
The desk is in the Kitchen.
Steve is a person.
Table of Test Actions
Commands
examining the desk
Steve examining the desk
the player examining the desk
Reported by : zarf
Description :
The table entry "(action of) the player examining the desk" generates a compile-time block entry
Array BC_178 --> 0 (101449728) STORED_ACTION_TY MAX_POSITIVE_NUMBER ##Examine I125_desk 0 player 0 0;
This doesn't compile because "player" is a global variable.
It looks like actions in table entries (and other compile-time stored-action declarations) must not have variables. The compiler should detect this and complain. For the particular case of "the player" in an action, it might suggest leaving the argument off ("examining the desk") or replacing it with "yourself".
(In a rule body, "the action of the player examining the desk" is legal because the variables are immediately resolved to constants, e.g. "yourself".)
Steps to reproduce :
Additional information :
imported from: [Mantis 1464] A top-level action declaration with variables generates invalid I6 code