Inform6: Object with multi-word names and parse_name

Hello again amazing people!

I’m trying to get Inform6 to identify an object with a multi-word name. It’s a button and, eventually, will be siblinged to a number of other buttons all with unique names so just referring to it as “button” won’t work.

I saw this thread which seems to confirm that I need to use parse_name to accomplish this.

I also read over @zarf’s Inform: Parse_Name Variations and pages 209-210 of the DM4 and came up with this code:

Object -> main_button "flashing button"
    has pressable switchable, ! pressable is an Attribute I added for LibraryMessages "Push" variation
    description "A large round brightly-flashing button. It's very nature
        cries out, ~Push me. PUSH me. PUSH ME, DAMN YOU!~",

    parse_name [;
        if (NextWord() ~= "flashing") return 0;
        if (NextWord() == "button") return 2;

        return 1;

It gets called but Inform still gives me the response “You can’t see any such thing.” even though the button is listed in the room’s description…

Dictionary words need to use single quotes.

if (NextWord() ~= 'flashing') return 0;
    parse_name [;
        if (NextWord() == 'button') return 1;
        if (NextWord() == 'flashing' && NextWord() == 'button') return 2;
        return 0;

That was it!

I had misunderstood the problem statement.