Menu choices problem (expected menuitem) [SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
jaco6222
Newbie
Posts: 4
Joined: Tue Nov 22, 2016 4:58 am
Contact:

Menu choices problem (expected menuitem) [SOLVED]

#1 Post by jaco6222 »

This is my first project and I am definitely new to this so thanks in advance for the help

I get the error message of Expected menuitem when using this code

Code: Select all

    # Show character
    show char_2 happy at right with moveinleft
    
    "???" "Excuse me, are you lost?"
    
    # Show character
    show char_1 happy at left with moveinright
    
    menu:
        "No, but thanks for asking"
        jump friendly_response_1
        
        "Not now please, I'm not in the mood"
        jump neutral_response_1
        
        "F**k off c**t, don't just assume that!"
        jump negative_response_1
    
    label friendly_response_1:
        $ char_2_points += 1
        "???" "Oh sorry, I'll be on my way now"
    
    label neutral_response_1:
        "???" "Um... Ok, sorry for bothering you"
    
    label negative_response_1:
        $ char_2_points -= 1
        "???" "Woah, you really aren't going to make any friends with that attitude"
        "???" "You should speak properly to strangers you know?"
The variable char_2_points has been properly defined (I hope) at the start of the script with this

Code: Select all

$ char_2_points = 0
The error message is as follows: (because IDK how to add an image to a post ;) )

File "game/script.rpy", line 213: expected menuitem
jump friendly_response_1

The game isn't a dating sim but it uses this "points" variable to track various choices the player made so to adapt the story to your playthrough.

Also on a side note if someone wants to volunteer to write my story I'd be SOOOO happy because none of us working on it can write a good story if our lives depended on it. (yes I know it's in the wrong section but I figured it couldn't hurt to ask)

Thanks for the quick reply, it now is clear how quick of a fix it is.
Last edited by jaco6222 on Wed Dec 28, 2016 7:04 am, edited 1 time in total.

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Menu choices problem (expected menuitem)

#2 Post by IrinaLazareva »

colons (:)

Code: Select all

    menu:
        "No, but thanks for asking":
            jump friendly_response_1
        
        "Not now please, I'm not in the mood":
            jump neutral_response_1
        
        "F**k off c**t, don't just assume that!":
            jump negative_response_1

Post Reply

Who is online

Users browsing this forum: Google [Bot]