Problem with new verbs

Jonathan O
22 Oct 2020, 19:55

Having created a fairly elaborate Help script, I now find that whenever I try to create a new verb, for any object, I get a message "Verb would clash with command: help;?" I can't see why this should happen. The only way in which the script for Help differs from any other is that it uses the get input function. Can anyone help with this?


mrangel
22 Oct 2020, 20:03

I'm wondering if there could be something weird about the pattern for the help command, rather than the script.
While the game is running, what's the pattern for that command?

You could look at it using the debugger, or by including a script command like msg (help.pattern) somewhere temporarily.

The default help command has the pattern ^help$|^\?$ - I'm wondering if the pattern help;? included in your error message might cause a problem because it treats the question mark as meaning "any character" or something when comparing it to your verb.


Jonathan O
22 Oct 2020, 21:09

Since posting this I've discovered that it only applies to new verbs - ones already in the sidebar aren't affected.


Jonathan O
22 Oct 2020, 21:25

OK, I've deleted the ? and the problem is solved. I'll either use a regular expression, or put the ? back right at the end of the editing process (it doesn't affect any verb that's already been created, as far as I can see). Thanks for your help (?)