Run-time error possibly related to Numbered Disambiguation Choices by Aaron Reed

This is in Inform 6M62, with Numbered Disambiguation Choices version 10/190320 by Aaron Reed.

In my game, the command “attach 7” caused a run-time error:

>attach 7

*** Run-time problem P10: Since the north is not allowed the property "disambiguation id", it is against the rules to try to use it.

I do not know why “north” was in the disambiguation list, but apparently it was.

I’m guessing I just need to change these lines in the extension


Every thing has a disvalue called disambiguation id. The disambiguation id of something is usually default-disvalue. Every room has a disvalue called disambiguation id. The disambiguation id of a room is usually default-disvalue.

To decide which disvalue is the corresponding disvalue of (N - a number):
	(- MyDecideDisvalue ({N}) -).

Include
(-

[ MyDecideDisvalue n;
	if ((n < 1) || (n > 15))
		return (+ invalid-disvalue +);
	return n + 2;
];

-).

Understand the disambiguation id property as describing a thing. Understand the disambiguation id property as describing a room.

to say something like this instead:

Every object has a disvalue called disambiguation id. The disambiguation id of an object is usually default-disvalue.


To decide which disvalue is the corresponding disvalue of (N - a number):
	(- MyDecideDisvalue ({N}) -).

Include
(-

[ MyDecideDisvalue n;
	if ((n < 1) || (n > 15))
		return (+ invalid-disvalue +);
	return n + 2;
];

-).

Understand the disambiguation id property as describing an object.

Would that cover it, do you think?

Ok, “Understand the disambiguation id property as describing an object” doesn’t compile.

But this does:

Every thing has a disvalue called disambiguation id. The disambiguation id of something is usually default-disvalue.
Every room has a disvalue called disambiguation id. The disambiguation id of a room is usually default-disvalue.
Every direction has a disvalue called disambiguation id. The disambiguation id of a direction is usually default-disvalue.
Every region has a disvalue called disambiguation id. The disambiguation id of a region is usually default-disvalue.


To decide which disvalue is the corresponding disvalue of (N - a number):
	(- MyDecideDisvalue ({N}) -).

Include
(-

[ MyDecideDisvalue n;
	if ((n < 1) || (n > 15))
		return (+ invalid-disvalue +);
	return n + 2;
];

-).

Understand the disambiguation id property as describing a thing.
Understand the disambiguation id property as describing a room.
Understand the disambiguation id property as describing a direction.
Understand the disambiguation id property as describing a region.

I don’t know that it’s even possible for the player to refer to a region, but I included it just in case.

Does that cover everything? (I mean, does this cover all the changes that need to be made to the extension to make it work for disambiguating objects other than things and rooms? I don’t know I6 at all.)

If the run-time error went away, I would think that you’re OK. The issue isn’t the I6 itself so much as the fact that direction objects aren’t assigned the property to store a disambiguation id value. There are a few special objects defined at the I6 level that would normally never be referenced in the game, such as the compass object that “stores” the various defined directions. They wouldn’t be affected, but it shouldn’t matter.

I’m a little curious about how that error came about in the first place. My guess would be that it’s because “7” by itself can initially be interpreted as a descriptor word by the parser, but I’m not certain.

Thank you!

There is a thing that has “7” in its name, so it’s possible to refer to that thing as 7.

There’s also a hint extension that uses numbers to refer to hint topics.

This sounds similar to what we discussed here:
https://intfiction.org/t/an-observation-on-directions-and-another-niggle-in-numbered-disambiguation-choices/63908/

Interesting. I tried “x directions” and didn’t get a run-time error. I guess because I modified the extension to give disambiguation ids to directions?

But also, if I type just “direction” (without “examine”), it seems to interpret that as a synonym for “directions,” which I have as one of several commands that will bring up the help menu.

1 Like