I7: logging commands throws an error

I’ve been trying to give a transcript of moves with a game status (e.g. for player hints.) It works great and simply almost all the time. But I have a problem with disambiguation. Code like the following throws an error. It won’t show in an actual game, due to the but I’m still curious.

[code]“logerror” by andrew

room 1 is a room. room 2 is a room.

to say current-status: say “Nothing interesting. This would go to a debug file in a more robust example.”

the sandwich is a thing. the player carries the sandwich.
the soda is a thing. the player carries the soda.

the red door is a locked door. west of red door is room 1. east of red door is room 2.

every turn:
say “[the player’s command]: [current-status]”

test oops with “unlock door/i”[/code]

I get error P39 when I try to run this. It looks like Inform thinks the command still has 2 words and is trying to parse it.

What should I do to change this? Is there an updated or different variable for the player’s command once we ask for disambiguation? Should I parse things more manually? Or, even if this is an Inform bug, is there a workaround?


Here’s a workaround:

To correct the player's command: (- players_command = 100 + WordCount(); -). Every turn: correct the player's command; say "[the player's command]: [current-status]".
It looks like an Inform bug to me, but I haven’t dug into it much yet.

Yes, probably a bug; it looks the same as 865, just with a different manifestation.

Thanks for this and the workaround! Looking at the bug report, I see how to search for it now a bit better next time. It’s still kind of intimidating, though.