ok i forgot to test my code verbatim and it turns out it only fails with number phrases. Try:
Foo is a room.
The other button is in Foo.
The 1 button is in Foo. Understand “bar” as the 1 button.
Right. I think the upshot is you can’t / shouldn’t name an object starting with a digit. It’s too difficult for the compiler to sort out, which is enough of a reason to not do it.
If you called the thing ‘1 button’ for your own use as an author (e.g. the player is unlikely to ever call a button ‘1 button’. They might call it ‘button 1/one’, but not ‘1 button’.) just put the number to the right, in words, for your own naming purposes; name the object “button one”. Inform also won’t have a problem if you then say ‘Understand “button 1” as button one.’ You can even get away with ‘Understand 1 as button one’, but such an unqualified connection of the number 1 to the object is a bit fraught and could come back to bite you later, or in other circumstances.
I guess I’d sum up my advice:
Don’t start an object’s name with a number
Don’t ‘understand (a number on its own)’ as a particular thing, for safety. I’ve a vague memory I saw a post that indicated Inform 10 might block this anyway, or some numeric vagueness, but I can still do this second thing in Inform 6M62
This example compiles for me. You could post your error message. However, Wade is right in that starting a name with a number might lead to confusion down the road (Inform can understand “one” as “1”)
If I can ask, what are you trying to do? Will players be typing FEED ONE DOG for instance?
>x button
Which do you mean, the happy button or the one button?
>one
(the happy button)
You see nothing special about the happy button
Which is a result, as @kamineko and @severedhand point out, from naming something with a number at the beginning (either as a symbol or in words).
Since it looks like you want to have several numbered buttons, you might want to try something like this:
Note that I didn’t bother to change the name of the dog, since that didn’t seem to cause any additional problems (except for the indefinite article).
ETA: note that the parser doesn’t care about order (or even repetition) when parsing multi-word nouns. See this output:
>x one button
(the one button)
You see nothing special about the one button.
>x button one
You see nothing special about the one button.
>x one button one one button button
You see nothing special about the one button.