expected menuitem

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.
Message
Author
uluuu
Regular
Posts: 55
Joined: Sat Apr 14, 2007 7:29 pm
Projects: Half Past Never
Location: California, USA
Contact:

expected menuitem

#1 Post by uluuu »

This is the first time I have ever tried to program anything, so I apologize if this is something really stupid and obvious.

I keep getting this error when I try to run my test game thing.
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 25 of C:\My Documents\projects\renpy-6.3.0-full\renpy-6.3.0\messing around/game/script.rpy: expected menuitem
jump dance
^

On line 59 of C:\My Documents\projects\renpy-6.3.0-full\renpy-6.3.0\messing around/game/script.rpy: expected menuitem
jump hungryphone
^

Ren'Py Version: Ren'Py 6.3.0d
I was able to fix everything else, but I don't understand what this means. Thanks in advance!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: expected menuitem

#2 Post by PyTom »

Almost certainly this is an indentation problem. Please copy in the appropriate section of your game's code, enclosed in [code] [/code] tags.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

uluuu
Regular
Posts: 55
Joined: Sat Apr 14, 2007 7:29 pm
Projects: Half Past Never
Location: California, USA
Contact:

Re: expected menuitem

#3 Post by uluuu »

Code: Select all

    jump dance
     
    "Lie down and rest."
    jump rest
     
    "Call my friend Miyu."
    jump friend
     
label dance:
    show happy
    "I decided to dance the day away, ignoring my painful cough."
    
    
    y "Well that was fun."
    
    "Then I fainted.  I woke up in a car with no recollection of being there."
    show what
    
    y "...Huh."
    return
    
label rest:
    show what
    "So I decided to rest.  For days I slept.  When I woke up, I was all better.  What a boring story."
    return

label friend:
    show happy
    "I decided to call my friend, Miyu."
    
    y "What was her number again?"

menu:
    "867-5309, of course."
    jump hungryphone

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: expected menuitem

#4 Post by PyTom »

Code: Select all

menu:
    "867-5309, of course.":
        jump hungryphone
Note the colon after the menu choice, and the indented block after that.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

uluuu
Regular
Posts: 55
Joined: Sat Apr 14, 2007 7:29 pm
Projects: Half Past Never
Location: California, USA
Contact:

Re: expected menuitem

#5 Post by uluuu »

Oh. Gosh. I should have realized that. Thank you!
(Yay, I got it to run, too.)

daynachrista
Newbie
Posts: 4
Joined: Mon Dec 24, 2012 9:53 am
Contact:

Re: expected menuitem

#6 Post by daynachrista »

I'm having the similar problem, and just can't figure it out. Oh, I'm new at these programming game too. Please help :')
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game\script.rpy", line 62: expected menuitem
scene bg cafe with dissolve
^
File "game\script.rpy", line 63: expected menuitem
show shizuku at left with dissolve
^

Ren'Py Version: Ren'Py 6.14.1.366

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

Re: expected menuitem

#7 Post by Alex »

I suppose it should look like

Code: Select all

menu:
    "Choice 1":
        scene bg cafe with dissolve
or something.

About blocks and indentation you can read there - http://www.renpy.org/wiki/renpy/FAQ#How ... _blocks.3F

daynachrista
Newbie
Posts: 4
Joined: Mon Dec 24, 2012 9:53 am
Contact:

Re: expected menuitem

#8 Post by daynachrista »

Alex wrote:I suppose it should look like

Code: Select all

menu:
    "Choice 1":
        scene bg cafe with dissolve
or something.

About blocks and indentation you can read there - http://www.renpy.org/wiki/renpy/FAQ#How ... _blocks.3F
thank you sooo much!!!

aleksandra2187
Newbie
Posts: 3
Joined: Sat May 09, 2015 2:54 pm
Contact:

Re: expected menuitem

#9 Post by aleksandra2187 »

Hi guys this is the code to my game, can you tell me why I get an error

Code: Select all

label start:
     scene houses
     show Misaki1
     m "Today is so boring. I have few friends and all of them are busy with school stuff."
     m "What am I going to do..."
     hide Misaki1
     show Rose1
     r "Hey, aren't you Misaki Vu?"
     menu:    
        "Yes.. Who asks?":  
             jump newfriend
        "Leave me alone! Creep!":
             jump notafriend 
        label newfriend:
            show Rose2 at left
            hide Rose1
            r "I'm Rose Braveheart, junior artist and a BIG fan of your artwork and poetry."
            r "Would you mind giving me some tips."
            show Misaki5 at right
             "Sure.":
            "(Good Ending)"
        return
        label notafriend:
            "Go get yourself a teacher, 'cuz I ain't one":
                 r "I.. I'm sorry for bothring you."
            "(Bad Ending)"
        return
     return

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: expected menuitem

#10 Post by philat »

aleksandra2187 wrote:

Code: Select all

label start:
     scene houses
     show Misaki1
     m "Today is so boring. I have few friends and all of them are busy with school stuff."
     m "What am I going to do..."
     hide Misaki1
     show Rose1
     r "Hey, aren't you Misaki Vu?"
     menu:    
        "Yes.. Who asks?":  
            jump newfriend
        "Leave me alone! Creep!":
            jump notafriend 

label newfriend:
    show Rose2 at left
    hide Rose1
    r "I'm Rose Braveheart, junior artist and a BIG fan of your artwork and poetry."
    r "Would you mind giving me some tips."
    show Misaki5 at right
    "Sure."
    "(Good Ending)"
    return

label notafriend:
    "Go get yourself a teacher, 'cuz I ain't one"
     r "I.. I'm sorry for bothring you."
     "(Bad Ending)"
     return
Only use colons after menu choices. There are no choices in the labels newfriend/notafriend, so there shouldn't be any colons. Make sure indentations are uniform -- there were a few that were one space more than others.

aleksandra2187
Newbie
Posts: 3
Joined: Sat May 09, 2015 2:54 pm
Contact:

Re: expected menuitem

#11 Post by aleksandra2187 »

Thanks for the help Veteran I fixed it :) by deleating the labels & the jumps. I just can't uderstant them :roll:

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: expected menuitem

#12 Post by trooper6 »

aleksandra2187 wrote:Thanks for the help Veteran I fixed it :) by deleating the labels & the jumps. I just can't uderstant them :roll:
Labels are core to making a VN with any choices. You should really practice using them. They aren't that hard. Start using them without menus. Then add menus.

Code: Select all

label start:
    "Your game starts here."
    "If this jump doesn't work, the game will end."
    jump other
    return

label other:
   "If you got here, the jump worked."
   "Now the game will end.
    return
The code philat gave you should work, so you should really try that out too.
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

aleksandra2187
Newbie
Posts: 3
Joined: Sat May 09, 2015 2:54 pm
Contact:

Re: expected menuitem

#13 Post by aleksandra2187 »

I will try harder, thanks for the encouragement and the example :)

Visualist
Newbie
Posts: 2
Joined: Mon Jul 04, 2016 3:58 pm
Contact:

Re: expected menuitem

#14 Post by Visualist »

Can someone please help me? I'm get the expected menuitem error message, too. Here's the code I'm using:
menu:
"Waffles":
y "I feel like eating some waffles this morning."
"*You pop two frozen waffles in the toaster*"
"Boink! *The waffles pop up*"
y "Yum, time to eat!"
"*You eat the waffles and head upstairs to
your bedroom to get dressed for school.*"
"Cereal":
y "It's definitely a cereal morning!"
"*You pull a box of your favorite cereal,
Citrus Puffs, out of the pantry.*"
y "You know what, I feel like eating cereal
straight from the box today!"
"*You eat some cereal, put the box back in
the pantry, and head upstairs to your room to get dressed
for school.*"
"Bacon & Eggs":
y "Hm, bacon and eggs sounds good."
"*You open the fridge and pull out a package of bacon and
a carton of eggs. You crack three eggs and put them in a
small skillet on the stove.*"
"*You open the package of bacon and put a few piece of bacon
in another skillet and put that on the stove, too.*"
"30 minutes later..."
y "This plate of bacon and eggs is calling my name!"
"*You eat the bacon and eggs, clear your plate, and then
head upstairs to get dressed for school.*"

label after_menu:

scene bedroom

Sorry that the colors and stuff didn't copy right.

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

Re: expected menuitem

#15 Post by IrinaLazareva »

Code: Select all

    menu: 
        "Waffles":
            y "I feel like eating some waffles this morning."
            "*You pop two frozen waffles in the toaster*"
            "Boink! *The waffles pop up*"
            y "Yum, time to eat!"
            "*You eat the waffles and head upstairs to 
            your bedroom to get dressed for school.*"
        "Cereal":
            y "It's definitely a cereal morning!"
            "*You pull a box of your favorite cereal, 
            Citrus Puffs, out of the pantry.*"
            y "You know what, I feel like eating cereal
            straight from the box today!"
            "*You eat some cereal, put the box back in 
            the pantry, and head upstairs to your room to get dressed    
            for school.*"
        "Bacon & Eggs":   
            y "Hm, bacon and eggs sounds good."  
            "*You open the fridge and pull out a package of bacon and 
            a carton of eggs. You crack three eggs and put them in a     
            small skillet on the stove.*"   
            "*You open the package of bacon and put a few piece of bacon      
            in another skillet and put that on the stove, too.*" 
            "30 minutes later..."      
            y "This plate of bacon and eggs is calling my name!"
            "*You eat the bacon and eggs, clear your plate, and then
            head upstairs to get dressed for school.*"
label after_menu:
    scene bedroom

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]