Responses in extensions

I may be missing something obvious, but…

[code]Include Tutorial Mode by Emily Short.

Place is a room.

can’t turn off tutorial mode when it is off rule response (A) is “Tutorial mode is already off.”.[/code]

That gives me an error like I7 has no idea what tutorial mode is, or even that I’m trying to edit a response. The full error goes:

I’m confused. I installed the extension, and can use it (it shows up in the game, working properly). I listed the extension before the response edit. Why doesn’t this method of editing a response work?

BTW, I can easily dive into the extension, copy-paste the whole code and do the changes I want, no problem. But I was wondering what I could have done wrong.

This looks like a bug in Inform concerning rules with “is” in their name. [EDIT: I initially said “when” but the culprit is “is.”] A workaround is to set the response using a “when play begins” instead of an initial declaration, like this:

[code]Include Tutorial Mode by Emily Short.

Place is a room.

When play begins: now can’t turn off tutorial mode when it is off rule response (A) is “Tutorial mode is already off.”.[/code]

I’ll file this as a bug, and also if I manage to get to revising the extension before the next bugfix release of Inform comes out, I’ll change the name of the rule. [EDIT: Now that I know “is” is the culprit, this will be simple–change “it is” to “it’s.”]

Related to inform7.com/mantis/view.php?id=1750 , although I think that was problem with the word “have” rather than “when”.

Reported.

(By the way, I7 indeed has no idea what tutorial mode is, at least in the context of that declaration–“tutorial mode” is just part of the name of the rule and doesn’t get interpreted to have to do with the extension name or the mode in the extension. The problem is that it doesn’t realize you’re trying to edit a response–I’m pretty sure it’s parsing the sentence as

(can't turn off tutorial mode when it) is (off rule response (A) is "Tutorial mode is already off.").

and you’re getting errors because both sides of that are illegal object names.)

Oh, well, I’m glad to have been able to locate a bug. :slight_smile: It’s also very good to know of the workaround. Many thanks!