Hi there,
I’m trying to track down a P39 runtime error in my WIP, and think I have stumbled upon on a bug (or I’m doing something illegal). Consider the following:
[code]“Player’s Command Test”
room1 is a room.
Jim is here. Jim is a man.
A pear is here. An orange is here.
Persuasion rule for asking Jim to try doing something: persuasion succeeds;
To decide whether (snp - a snippet) is/are invalid: (- ( ({snp} < 101) || (({snp} % 100) < 1) ) -).
Every turn:
if the player’s command is invalid:
say “player’s command invalid”;
otherwise:
say “player’s command valid[line break]”;
say “player’s command = [player’s command]”;
test me with “jim, get pear. get orange”.[/code]
This generates “*** Run-time problem P39: Attempt to say a snippet value which is currently invalid: words 1 to 7.” Why? I’m completely confused by this as “player’s command is invalid” returns false, so printing the player’s command should be okay…
Thanks,
Matt