"Say menuitems and captions cannot exist within the same menu."

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
ElonMuskIsMyDad
Newbie
Posts: 10
Joined: Sun Nov 29, 2020 4:02 pm
Contact:

"Say menuitems and captions cannot exist within the same menu."

#1 Post by ElonMuskIsMyDad »




Hello, everyone!

This is the first time I have attempted to make choices in a game. The actual choices work just fine without label after_menu. When I wanted to "end" the menu, so to speak, I created label after_menu so I could continue on with coding the game. However, I think the game is still counting it as part of the menu, so I can't use any captions alongside the dialog. The error is triggered at line 72, which is j "So, why are we at the tavern? If you're just trying to get me drunk so I'll forget about this...forget about it!" I don't understand what I'm doing wrong, so any advice would be really appreciated! I hope this made sense; it was a little difficult to try to convey my confusion. I have included my code below. Thank you!



define j = Character("Jessie", color="#A569BD")
define m = Character("Marta", color="#A3DD0D")
define ji = Character("Jiminy", color="#A33F00")

label start:
scene forest jr
show j rattled

j "I don't know why, and I don't know how, but I can sense buffoonery is afoot!"
"The incredible hero, Jessie Cube, takes a bold whiff of the morning dew (and not any illicit drugs) before heading off towards the town."
"On her way there, she hears intense screaming from the direction of the village."
j "Aha! Screaming! I knew someone was up to something."

scene town
show j rattled at left
j "All right, all right, what's going on this time?"
show worried marta at right
m -"Oh, Jessie Cube! Thank ***** you're here! Something dreadful has happened!"
j "Yeah, Marta, I gathered as much. What actually happened?"
m -"Well, that's just it. None of us know what's going on?"
j "Beg pardon?"
m "It's true! Something's terribly wrong with Jiminy, but we haven't the slightest clue what!"
j "Fear not, m'lady, for the valiant Jessie Cube shall solve this for you."
m "Oh, thank goodness. His eyes are ********."
j "What was that?"
m "**** **!"
j "You're scaring me. I'm gonna go help Jiminy."

scene town
j "Yo, Jiminy! What's your deal, dude? You're scaring everyone."
show brand new jiminy corrupted
j "Seriously, what is WITH you people today?"
ji "*** ***** ***** *** *** ****."
j "Bro, could you please stop? I'm a great hero. I don't have time for childish shenanigans."
ji "** *** *** **** ** ***."
j "I'm ignoring that. Anyway, what the fudgesicle is up with your face?"
ji "*** ****** ***** * *** ** *****?"
j "I've had just about enough of you clowning around. You're scaring the townspeople. If you won't tell me what's going on, I'm gonna throw you in the slammer."
"Jiminy says nothing, continuing to stare at you. His eyes are seeing past you."

menu:
"All right, great hero, what will you do now?"

"Punch him.":
jump punch_ending

label punch_ending:
"With all the might that is expected of a hero who did a few years of track in high school, you punch Jiminy. He smiles, though the stiffness of his mouth hardly reveals this. Silence. You punch him again. No response. He doesn't even flinch."
return


"Kiss him.":
jump kiss_ending

label kiss_ending:
"Though one of his eyes widens, Jiminy does not say anything. At this point, you'd settle for the gibberish he was spouting earlier. Sad day."
return

"Threaten to tell his mom on him if he doesn't comply.":
jump threaten_choice

label threaten_choice:
"This seems to strike a chord with him. Grabbing your hand, Jiminy barrels off towards the local tavern. 'It's a good thing I can legally drink in this town,' you say as you approach the tavern."



label after_menu:
scene tavern
show j happy at left
show jiminy corrupted at right

j "So, why are we at the tavern? If you're just trying to get me drunk so I'll forget about this...forget about it!"
"Jiminy shakes his head. If only he would blink. That might help the nauseous feeling you get when you look at his face. What is up with his face, anyway?"
j "Well, I do want to show my appreciation for what I believe is your cooperation, so I'll order us something."
"Ten minutes later..."
j "All right, bud, start talking! Your apple cider becomes mine if you don't."
"Sighing, Jiminy nods."
ji "I can't really talk."
j "Oh--"
ji "No, no. I mean that if I talk too much, they'll become suspicious."
j "Who's they?"
ji "I can't say any more than that. They own my soul, Jessie Cube."
j "Um, okay? What's that supposed to mean?"
ji "I don't know, but talk to Marta. She's noticed things."
j "She was talking weird earlier, like you."
ji "That's because they are censoring us."
j "'WHO??' You bang your fists on the table."
ji "I can't say. I'm surprised they've let me talk this long."
j "I guess I'll go check in with Marta, then. Thanks for your help, Jiminy."
ji "I wish I could have said more."
j "Nah, don't worry about it."

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: "Say menuitems and captions cannot exist within the same menu."

#2 Post by Alex »

Check the indentation in your script.
This should work.

Code: Select all

define j = Character("Jessie", color="#A569BD")
define m = Character("Marta", color="#A3DD0D")
define ji = Character("Jiminy", color="#A33F00")

label start:
    scene forest jr
    show j rattled

    j "I don't know why, and I don't know how, but I can sense buffoonery is afoot!"
    "The incredible hero, Jessie Cube, takes a bold whiff of the morning dew (and not any illicit drugs) before heading off towards the town."
    "On her way there, she hears intense screaming from the direction of the village."
    j "Aha! Screaming! I knew someone was up to something."

    scene town
    show j rattled at left
    j "All right, all right, what's going on this time?"
    show worried marta at right
    m -"Oh, Jessie Cube! Thank ***** you're here! Something dreadful has happened!"
    j "Yeah, Marta, I gathered as much. What actually happened?"
    m -"Well, that's just it. None of us know what's going on?"
    j "Beg pardon?"
    m "It's true! Something's terribly wrong with Jiminy, but we haven't the slightest clue what!"
    j "Fear not, m'lady, for the valiant Jessie Cube shall solve this for you."
    m "Oh, thank goodness. His eyes are ********."
    j "What was that?"
    m "**** **!"
    j "You're scaring me. I'm gonna go help Jiminy."

    scene town
    j "Yo, Jiminy! What's your deal, dude? You're scaring everyone."
    show brand new jiminy corrupted
    j "Seriously, what is WITH you people today?"
    ji "*** ***** ***** *** *** ****."
    j "Bro, could you please stop? I'm a great hero. I don't have time for childish shenanigans."
    ji "** *** *** **** ** ***."
    j "I'm ignoring that. Anyway, what the fudgesicle is up with your face?"
    ji "*** ****** ***** * *** ** *****?"
    j "I've had just about enough of you clowning around. You're scaring the townspeople. If you won't tell me what's going on, I'm gonna throw you in the slammer."
    "Jiminy says nothing, continuing to stare at you. His eyes are seeing past you."

    menu:
        "All right, great hero, what will you do now?"

        "Punch him.":
            #jump punch_ending #<--- actually, you don't need to jump to a label in this case
            
            #label punch_ending: #<--- just put the code in a menu choice block
            "With all the might that is expected of a hero who did a few years of track in high school, you punch Jiminy. He smiles, though the stiffness of his mouth hardly reveals this. Silence. You punch him again. No response. He doesn't even flinch."
            #return #<--- this will bring you back to main menu
            
            
        "Kiss him.":
            #jump kiss_ending
            
            #label kiss_ending:
            "Though one of his eyes widens, Jiminy does not say anything. At this point, you'd settle for the gibberish he was spouting earlier. Sad day."
            #return 

        "Threaten to tell his mom on him if he doesn't comply.":
            #jump threaten_choice
            
            #label threaten_choice:
            "This seems to strike a chord with him. Grabbing your hand, Jiminy barrels off towards the local tavern. 'It's a good thing I can legally drink in this town,' you say as you approach the tavern."
            #return


label after_menu:
    scene tavern
    show j happy at left
    show jiminy corrupted at right

    j "So, why are we at the tavern? If you're just trying to get me drunk so I'll forget about this...forget about it!"
    "Jiminy shakes his head. If only he would blink. That might help the nauseous feeling you get when you look at his face. What is up with his face, anyway?"
    j "Well, I do want to show my appreciation for what I believe is your cooperation, so I'll order us something."
    "Ten minutes later..."
    j "All right, bud, start talking! Your apple cider becomes mine if you don't."
    "Sighing, Jiminy nods."
    ji "I can't really talk."
    j "Oh--"
    ji "No, no. I mean that if I talk too much, they'll become suspicious."
    j "Who's they?"
    ji "I can't say any more than that. They own my soul, Jessie Cube."
    j "Um, okay? What's that supposed to mean?"
    ji "I don't know, but talk to Marta. She's noticed things."
    j "She was talking weird earlier, like you."
    ji "That's because they are censoring us."
    j "'WHO??' You bang your fists on the table."
    ji "I can't say. I'm surprised they've let me talk this long."
    j "I guess I'll go check in with Marta, then. Thanks for your help, Jiminy."
    ji "I wish I could have said more."
    j "Nah, don't worry about it."
    return

Post Reply

Who is online

Users browsing this forum: No registered users