Need help with menus?

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
ninethousandpotatoes
Newbie
Posts: 8
Joined: Sat Jan 10, 2015 4:14 am
Contact:

Need help with menus?

#1 Post by ninethousandpotatoes »

I'm not really sure what's wrong here, because this is my first time making a ren'py game but i've been trying to figure out what's wrong with this menu for days now.

What I was trying to do is have a menu with three options, to pass a note, (nice or mean) to compliment or have small talk with one of six people.

This is the section I'm having problems with, right after I made the first menu to decide whether you want to pass a note, compliment, etc, and the menu only for the note that decides wether it's nice or mean. : (The error message is already attached)

menu:
"Kiki":
$ kiki_noteg = True
jump about_to_leave
"Puki":
$ puki_noteg = True
jump about_to_leave
"Naname":
$ naname_noteg = True
jump about_to_leave
"Hiro":
$ hiro_noteg = True
jump about_to_leave
"Ameko":
$ ameko_noteg = True
jump about_to_leave
"Irashi":
$ irashi_noteg = True
jump about_to_leave

scene notegetter_menu_b
c "{i}Who should I send it to?{\i}"
menu:
"Kiki":
$ kiki_noteb = True
jump about_to_leave
"Puki":
$ puki_noteb = True
jump about_to_leave
"Naname":
$ naname_noteb = True
jump about_to_leave
"Hiro":
$ hiro_noteb = True
jump about_to_leave
"Ameko":
$ ameko_noteb = True
jump about_to_leave
"Irashi":
$ irashi_noteb = True
jump about_to_leave

scene smalltalkto_menu
c "{i}Who should I talk to?{\i}"
menu:
"Kiki":
$ kiki_smtalk = True
jump about_to_leave
"Puki"
$ puki_smtalk = True
jump about_to_leave
"Naname"
$ naname_smtalk = True
jump about_to_leave
"Hiro"
$ hiro_smtalk = True
jump about_to_leave
"Ameko"
$ ameko_smtalk = True
jump about_to_leave
"Irashi"
$ irashi_smtalk = True
jump about_to_leave

scene compliment_who_menu
c "{i}Who should I compliment?{\i}"
menu:
"Kiki":
$ kiki_nice = True
jump about_to_leave
"Puki":
$ puki_nice = True
jump about_to_leave
"Naname":
$ naname_nice = True
jump about_to_leave
"Hiro":
$ hiro_nice = True
jump about_to_leave
"Ameko":
$ ameko_nice = True
jump about_to_leave
"Irashi":
$ irashi_nice = True
jump about_to_leave

scene about_to_leave
t "Okay, class will end in five minutes, please pack your things."

if selection == "kiki_noteg"
"You pass your note to Kiki hastily."
if selection == "puki_noteg"
"You pass your note to Puki hastily."
if selection == "naname_noteg"
"You pass your note to Naname hastily."
if selection == "hiro_noteg"
"You pass your note to Hiro hastiy."
if selection == "ameko_noteg"
"You pass your note to Ameko hastily."
if selection == "irashi_noteg"
"You pass your note to Irashi hastily."
Attachments
problem.PNG

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Need help with menus?

#2 Post by trooper6 »

Please put your code in between the code tags. Doing that preserves indentation which will make it easier for us to see what the problem is.

So before your code type: [ code], and at the end of your code type: [ /code]
But take out the space after the opening bracket.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

ninethousandpotatoes
Newbie
Posts: 8
Joined: Sat Jan 10, 2015 4:14 am
Contact:

Re: Need help with menus?

#3 Post by ninethousandpotatoes »

I'm sooo sorry. here you go.
ninethousandpotatoes wrote:I'm not really sure what's wrong here, because this is my first time making a ren'py game but i've been trying to figure out what's wrong with this menu for days now.

What I was trying to do is have a menu with three options, to pass a note, (nice or mean) to compliment or have small talk with one of six people.

This is the section I'm having problems with, right after I made the first menu to decide whether you want to pass a note, compliment, etc, and the menu only for the note that decides wether it's nice or mean. : (The error message is already attached)

Code: Select all

 menu:
        "Kiki":
        $ kiki_noteg = True
        jump about_to_leave
        "Puki":
        $ puki_noteg = True
        jump about_to_leave
        "Naname":
        $ naname_noteg = True
        jump about_to_leave
        "Hiro":
        $ hiro_noteg = True
        jump about_to_leave
        "Ameko":
        $ ameko_noteg = True
        jump about_to_leave
        "Irashi":
        $ irashi_noteg = True
        jump about_to_leave
        
    scene notegetter_menu_b
    c "{i}Who should I send it to?{\i}"
    menu:
        "Kiki":
        $ kiki_noteb = True
        jump about_to_leave
        "Puki":
        $ puki_noteb = True
        jump about_to_leave
        "Naname":
        $ naname_noteb = True
        jump about_to_leave
        "Hiro":
        $ hiro_noteb = True
        jump about_to_leave
        "Ameko":
        $ ameko_noteb = True
        jump about_to_leave
        "Irashi":
        $ irashi_noteb = True
        jump about_to_leave
        
    scene smalltalkto_menu
    c "{i}Who should I talk to?{\i}"
    menu:
        "Kiki":
        $ kiki_smtalk = True
        jump about_to_leave
        "Puki"
        $ puki_smtalk = True
        jump about_to_leave
        "Naname"
        $ naname_smtalk = True
        jump about_to_leave
        "Hiro"
        $ hiro_smtalk = True
        jump about_to_leave
        "Ameko"
        $ ameko_smtalk = True
        jump about_to_leave
        "Irashi"
        $ irashi_smtalk = True
        jump about_to_leave
        
    scene compliment_who_menu
    c "{i}Who should I compliment?{\i}"
    menu:
        "Kiki":
        $ kiki_nice = True
        jump about_to_leave
        "Puki":
        $ puki_nice = True
        jump about_to_leave
        "Naname":
        $ naname_nice = True
        jump about_to_leave
        "Hiro":
        $ hiro_nice = True
        jump about_to_leave
        "Ameko":
        $ ameko_nice = True
        jump about_to_leave
        "Irashi":
        $ irashi_nice = True
        jump about_to_leave
        
    scene about_to_leave
    t "Okay, class will end in five minutes, please pack your things."
    
        if selection == "kiki_noteg"
        "You pass your note to Kiki hastily."
        if selection == "puki_noteg"
        "You pass your note to Puki hastily."
        if selection == "naname_noteg"
        "You pass your note to Naname hastily."
        if selection == "hiro_noteg"
        "You pass your note to Hiro hastiy."
        if selection == "ameko_noteg"
        "You pass your note to Ameko hastily."
        if selection == "irashi_noteg"
        "You pass your note to Irashi hastily."[/quote]
[ /code]

User avatar
Pierrou
Regular
Posts: 53
Joined: Fri Dec 05, 2014 8:25 pm
Projects: Togainu no Chi, DMMD, Omerta, ...
Skype: pierrouney
Location: France
Contact:

Re: Need help with menus?

#4 Post by Pierrou »

You need to paste you code between

Code: Select all

[code]HERE
[/code]

And paste it from the original. We need to see how you indent your code... So copy your original code pls.
Sorry for my english, it's not my native language. :s

ninethousandpotatoes
Newbie
Posts: 8
Joined: Sat Jan 10, 2015 4:14 am
Contact:

Re: Need help with menus?

#5 Post by ninethousandpotatoes »

Sorry.

Code: Select all

menu:
        "Pass a note":
            jump note_type_menu
        "Small talk":
            jump smalltalkto_menu
        "Compliment":
            jump compliment_who_menu
    
    scene note_type_menu
    c "{i}What kind of letter should I pass?{\i}"
    menu:
        "A nice letter":
            jump notegetter_menu_g
        "A mean letter":
            jump notegetter_menu_b
    
    scene notegetter_menu_g
    c "{i}Who should I send it to?{\i}"
    menu:
        "Kiki":
        $ kiki_noteg = True
        jump about_to_leave
        "Puki":
        $ puki_noteg = True
        jump about_to_leave
        "Naname":
        $ naname_noteg = True
        jump about_to_leave
        "Hiro":
        $ hiro_noteg = True
        jump about_to_leave
        "Ameko":
        $ ameko_noteg = True
        jump about_to_leave
        "Irashi":
        $ irashi_noteg = True
        jump about_to_leave
        
    scene notegetter_menu_b
    c "{i}Who should I send it to?{\i}"
    menu:
        "Kiki":
        $ kiki_noteb = True
        jump about_to_leave
        "Puki":
        $ puki_noteb = True
        jump about_to_leave
        "Naname":
        $ naname_noteb = True
        jump about_to_leave
        "Hiro":
        $ hiro_noteb = True
        jump about_to_leave
        "Ameko":
        $ ameko_noteb = True
        jump about_to_leave
        "Irashi":
        $ irashi_noteb = True
        jump about_to_leave
        
    scene smalltalkto_menu
    c "{i}Who should I talk to?{\i}"
    menu:
        "Kiki":
        $ kiki_smtalk = True
        jump about_to_leave
        "Puki"
        $ puki_smtalk = True
        jump about_to_leave
        "Naname"
        $ naname_smtalk = True
        jump about_to_leave
        "Hiro"
        $ hiro_smtalk = True
        jump about_to_leave
        "Ameko"
        $ ameko_smtalk = True
        jump about_to_leave
        "Irashi"
        $ irashi_smtalk = True
        jump about_to_leave
        
    scene compliment_who_menu
    c "{i}Who should I compliment?{\i}"
    menu:
        "Kiki":
        $ kiki_nice = True
        jump about_to_leave
        "Puki":
        $ puki_nice = True
        jump about_to_leave
        "Naname":
        $ naname_nice = True
        jump about_to_leave
        "Hiro":
        $ hiro_nice = True
        jump about_to_leave
        "Ameko":
        $ ameko_nice = True
        jump about_to_leave
        "Irashi":
        $ irashi_nice = True
        jump about_to_leave
        
    scene about_to_leave
    t "Okay, class will end in five minutes, please pack your things."
    
        if selection == "kiki_noteg"
        "You pass your note to Kiki hastily."
        if selection == "puki_noteg"
        "You pass your note to Puki hastily."
        if selection == "naname_noteg"
        "You pass your note to Naname hastily."
        if selection == "hiro_noteg"
        "You pass your note to Hiro hastiy."
        if selection == "ameko_noteg"
        "You pass your note to Ameko hastily."
        if selection == "irashi_noteg"
        "You pass your note to Irashi hastily."
        
        if selection == "kiki_noteb"
        "You pass your note to Kiki hastily."
        if selection == "puki_noteb"
        "You pass your note to Puki hastily."
        if selection == "naname_noteb"
        "You pass your note to Naname hastily."
        if selection == "hiro_noteb"
        "You pass your note to Hiro hastiy."
        if selection == "ameko_noteb"
        "You pass your note to Ameko hastily."
        if selection == "irashi_noteb"
        "You pass your note to Irashi hastily."
        
        
        if selection == "kiki_smtalk"
        c "{size=14}Hey, Kiki, meet me outside of class?"
        k "{size=14}Sure."
        if selection == "puki_smtalk"
        c "{size=14}Hey, Puki, meet me outside of class?"
        p "{size=14}Oh, sure."
        if selection == "naname_smtalk"
        c "{size=14}Hey, Naname, meet me outside of class?"
        n "{size=14}No problem."
        if selection == "hiro_smtalk"
        c "{size=14}Hey, Hiro, meet me outside of class?"
        h "{size=14}Okay."
        if selection == "ameko_smtalk"
        c "{size=14}Hey, Ameko, meet me outside of class?"
        a "{size=14}Huh? Oh, sure."
        if selection == "irashi_smtalk"
        c "{size=14}Hey, Irashi, meet me outside of class?"
        i "{size=14}Um...{w}okay."
        
        if selection == "kiki_nice"
        c "{size=14}Hey, Kiki, meet me outside of class?"
        k "{size=14}Sure."
        if selection == "puki_nice"
        c "{size=14}Hey, Puki, meet me outside of class?"
        p "{size=14}Oh, sure."
        if selection == "naname_nice"
        c "{size=14}Hey, Naname, meet me outside of class?"
        n "{size=14}No problem."
        if selection == "hiro_nice"
        c "{size=14}Hey, Hiro, meet me outside of class?"
        h "{size=14}Okay."
        if selection == "ameko_nice"
        c "{size=14}Hey, Ameko, meet me outside of class?"
        a "{size=14}Huh? Oh, sure."
        if selection == "irashi_nice"
        c "{size=14}Hey, Irashi, meet me outside of class?"
        i "{size=14}Um...{w}okay."

User avatar
Pierrou
Regular
Posts: 53
Joined: Fri Dec 05, 2014 8:25 pm
Projects: Togainu no Chi, DMMD, Omerta, ...
Skype: pierrouney
Location: France
Contact:

Re: Need help with menus?

#6 Post by Pierrou »

ninethousandpotatoes wrote:Sorry.

Code: Select all

    menu:
        "Kiki":
        $ kiki_noteg = True
        jump about_to_leave
        "Puki":
        $ puki_noteg = True
        jump about_to_leave
        "Naname":
        $ naname_noteg = True
        jump about_to_leave
        "Hiro":
        $ hiro_noteg = True
        jump about_to_leave
        "Ameko":
        $ ameko_noteg = True
        jump about_to_leave
        "Irashi":
        $ irashi_noteg = True
        jump about_to_leave
You need to indent it well ;)

Code: Select all

    menu:
        "Kiki":
            $ kiki_noteg = True
            jump about_to_leave
        "Puki":
            $ puki_noteg = True
            jump about_to_leave
        "Naname":
            $ naname_noteg = True
            jump about_to_leave
        "Hiro":
            $ hiro_noteg = True
            jump about_to_leave
        "Ameko":
            $ ameko_noteg = True
            jump about_to_leave
        "Irashi":
            $ irashi_noteg = True
            jump about_to_leave
When you have this symbol : at the end of the line, you always need to indent the next line ;)
Sorry for my english, it's not my native language. :s

ninethousandpotatoes
Newbie
Posts: 8
Joined: Sat Jan 10, 2015 4:14 am
Contact:

Re: Need help with menus?

#7 Post by ninethousandpotatoes »

OMG THANK YOU!!!!!!!!!!!!!!

User avatar
Pierrou
Regular
Posts: 53
Joined: Fri Dec 05, 2014 8:25 pm
Projects: Togainu no Chi, DMMD, Omerta, ...
Skype: pierrouney
Location: France
Contact:

Re: Need help with menus?

#8 Post by Pierrou »

Haha no problem ;)

Don't forget to edit your first message (click on : Image) and add the [SOLVED] marker in the title ;)
Sorry for my english, it's not my native language. :s

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]