[I7] Unusual Runtime Error

Hello everyone. I made a quick command to list every thing which did not have a description. It worked fine for a while, but now I get a run-time error using it. Specifically, P47 - Phrase applied to an incompatible kind of value. Here’s the code in question.

Showing no descriptions is an action out of world. Understand "no descriptions" or "no des" as showing no descriptions.
Report showing no descriptions:
	say item_no_descriptions.

To say item_no_descriptions:
	say "[paragraph break][bold type]Items without descriptions: [roman type][line break]";
	repeat with item running through things:
		if description of item is "":
			say "[item][line break]".

Showing descriptions is an action out of world. Understand "descriptions" or "des" as showing descriptions.
Report showing descriptions:
	say item_descriptions.

To say item_descriptions:
	say "[bold type]Items with descriptions: [roman type][paragraph break]";
	repeat with item running through things:
		if description of item is not "":
			say "[bold type][item][roman type]: '[description of item]'[paragraph break]";

There is currently only a problem with ‘showing no descriptions’ not with ‘showing descriptions’, though now I figure I may run into one with it as well.

This is a minor issue, as it doesn’t actually effect my story, but I would like to know what’s going on. Any insight into this would be greatly appreciated.

That code looks correct.

Is it possible that you have a bug in a “printed name” property or a “printing the name of” rule?

I don’t really think so… I have no rules for printing the name of, and I just commented out all my printed name properties, and I still get the error.

Where exactly does the error show? In between object names, before them, or at the end? Do you get normal output at all or just the error message? If you type RULES ON and try the action, in which rule does the error occur?

I modified the code so that I could answer your questions… Here’s the output:

"There are 143 things in your story, and 35 things are described. So there should be 108 things with no description.

Items without descriptions:
108. say yes
107. say no.
106. say yes or no
105.
*** Run-time problem P47 (at paragraph 1 in the source text): Phrase applied to an incompatible kind of value.

self
104. getting ready to spend the night here"

And the list then continues all the way down to 1. So it seems the error is happening before printing ‘self’, but not really messing up any of the reporting output. So I tried commenting out ‘The player is a man called Knock’, which is the first line of real code (other than use options and whatnot). That didn’t help, so I also commented out my description of Knock (which by the way, had no problem showing up as the description of ‘yourself’ in my listing descriptions actions). This also did not help. Oh, and the only rule firing is the report rule for showing no descriptions.

By the way, if it helps anyone help me, I’m working through Sand-dancer in Aaron Reed’s Creating Interactive Fiction for Inform 7.

The obvious culprit is the object named “self” – there’s one in the conversation extension Sand-Dancer uses:

self-suggestion is a familiar thing. The printed name is "[it-them of the current interlocutor][if the current interlocutor acts plural]selves[otherwise]self[end if]"

My guess is that “current interlocutor” is not set in this context so either “it-them of the current interlocutor” or “if the current interlocutor acts plural” are throwing that error.

If this is just a debugging action I wouldn’t be worried about it.

Thanks Juhana, I didn’t think about looking at the extension. I’m going to leave it as is, because like you said, it is just for debugging. But I’m glad to know what’s going on to cause the error. Thanks for your help!