For the Tutorial Mode extension, I’m trying to write something that will catch when players have typed something like “FIDDLE WITH THE INSTRUMENT PANEL,” where the instrument panel is a thing that’s visible but “FIDDLE” isn’t a valid verb. This is what I have so far:
Lab is a room.
A rock is in the Lab. A roll is in the Lab.
A beaker is a thing.
After printing a parser error when the latest parser error is the not a verb I recognise error and the player’s command includes “[something]”:
say “It looks like you mentioned something that’s here, ‘[matched text in upper case],’ but you tried to interact with it using a verb or syntax that the game doesn’t understand. An actual helpful suggestion should go here.”[/code]
Which almost works:
So for that last one–is there any way to stop the disastrous attempt at disambiguation? Is this something that’s only likely to arise with commands ending with “the,” in which case I can probably just write another clause to bop commands ending with “the,” and people who write games about French teahouses and the musical efforts of Matt Johnson are on their own?