I7: does the player mean #1

So I have this code which works–but I don’t understand why the code that seems intuitive doesn’t work.

Basically I want to be able to call a number and default to something. But neither the “likely” rules or supplying a missing number seem to work as they do for things, e.g.

does the player mean examining the dog: it is likely.

rule for supplying a missing noun when examining: now the noun is the dog.

[code]“numlikely” by Andrew Schultz

room 1 is a room. the dog is in room 1.

understand the command “call” as something new.

understand “call [number]” as numcalling.

numcalling is an action applying to one number.

[does the player mean numcalling 1: it is very likely.

rule for supplying a missing number when numcalling: now the number understood is 1.]

carry out numcalling:
say “You call number [the number understood].”;

onecalling is an action applying to nothing.

understand “call” as onecalling.

carry out onecalling:
try numcalling 1 instead;
[/code]

Or am I missing something dumb? This is probably more curiosity than anything.

I don’t think “supplying a missing number” is an activity; there’s supplying a missing noun and supplying a missing second noun, but those are predefined in some sense. So supplying a missing foo won’t work for other kinds of foo. (Even if it did work, I think you’d need to understand “call” as numcalling; you need a grammar line with a missing noun for supplying a missing noun to run.)

1 Like

That’s correct; it’s not.

The solution above, with a “onecalling” action, is the simplest way to do what you want.

1 Like

Forgot to say thanks for this. Things make a lot more sense. I mean, if quizzed I’d kno activity != action but I don’t always interpret this into what it means.