menu acting strange

Issue #13 resolved
Fabian Maurer created an issue
menu
    option "I am me."
        say "I am creeper.";
        say "Nice to meet you.";
        menu
            option "Nice to meet you too."
                say "Hehe Thank you.";
        end
    option "Your death!"
        show "Creeper" "Angry";
        say "Yeah I don't like you either...";
end

"I am me." option terminates the script. "Your death!" option leads to introduction. "Nice to meet you too." option then terminates the script again.

Comments (7)

  1. Chimaine

    Are you missing the colons after the options on purpose?

    option <expr> : <block>
    

    Also, I really shouldn't have to say this but: LOGS!

  2. Fabian Maurer reporter

    Yeah, I saw this in the language reference too. You mean like

    menu
        option "I am me.":
            say "I am creeper.";
    end
    

    But this doesn't even compile (mismatched input ":", expecting "option".

    Simplified code:

    menu
        option "I am me."
            say "I am creeper.";
    end
    

    This code doesn't show the answer "I am creeper". As I said, can't use the planned syntax, cause it doesn't compile.

    I thought if I give you a script that always reproduces the error tha would be easier to debug than just reading the logs, but if you want I provide them: MobTalker2-0.log MobTalerScript-0.log

  3. Chimaine

    Looking at that I can confirm two things: I derped and I derped.

    Seems like I somehow managed to shift the index of the choice made by one up, resulting in the wrong (or no) block being executed. Secondly the menu command was sheduled to be overhauled in my task list, but somehow I got only halfway through. The version without the colon is the actual correct one as of now.

  4. Log in to comment