Expected Statement and Menuitem Errors

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
User avatar
natcreates
Newbie
Posts: 3
Joined: Thu Dec 14, 2017 4:40 am
Projects: Ctrl V
Organization: (we're working on it)
Tumblr: natcreatesstuff
Soundcloud: natcreates
Location: U.S.
Contact:

Expected Statement and Menuitem Errors

#1 Post by natcreates »

Hello! I'm new to Ren.Py, and I've been looking all over for some answers to these errors. I don't exactly understand what's messing up the code? If someone could explain it, I'd be delighted. It's probably some newbie thing that you guys hear all the time, but I honestly can't find any answers for it. :D

Code: Select all


File "game/script.rpy", line 19: expected statement.
    “My alarm buzzes. Why won’t it just shut off?” 
                    ^

File "game/script.rpy", line 20: expected statement.
    “They could at least make them be.. Y’know.. Quieter?”
                ^

File "game/script.rpy", line 21: expected statement.
    “If I keep up this attitude, I’ll never manage to wake myself up.”
                               ^

File "game/script.rpy", line 22: expected statement.
    y “Shut up already!”
                      ^

File "game/script.rpy", line 25: expected menuitem
    “Wake up.”
    ^

File "game/script.rpy", line 31: expected statement.
    “Ugh. Fine. I guess I have to actually wake up.”
                                                  ^

File "game/script.rpy", line 32: expected statement.
    “Life would be so much better if I could sleep… forever…”
                                  ^

File "game/script.rpy", line 33: expected statement.
    m “IT’S 6AM! TIME TO GET UP!”
               ^

File "game/script.rpy", line 34: expected statement.
    y “Alright, alright! I’m up!”
              ^

File "game/script.rpy", line 35: expected statement.
    “I turn off my alarm.”
                        ^

File "game/script.rpy", line 36: expected statement.
    y “Welp. Time to get dressed.”
           ^

File "game/script.rpy", line 37: expected statement.
    “I get dressed in the my casual clothes.”
                   ^

File "game/script.rpy", line 38: expected statement.
    “No time for breakfast - I gotta catch the bus!”
                                                  ^

File "game/script.rpy", line 40: end of line expected.
    show busstop.png
                ^

File "game/script.rpy", line 46: expected statement.
    “I head towards the bus stop, waiting nearby, there’s a girl also wearing the Kirakira school uniform.”
                                ^

File "game/script.rpy", line 48: expected statement.
    “Maybe she’s my classmate.”
                             ^

File "game/script.rpy", line 50: expected statement.
    ug “Where is he!?”
                   ^

File "game/script.rpy", line 52: expected statement.
    “She looks over at me, embarrassed.”
                    ^

File "game/script.rpy", line 54: expected statement.
    ug “Gah! S-Sorry.”
           ^

File "game/script.rpy", line 56: expected statement.
    y “No-no It’s… okay.”
                       ^

File "game/script.rpy", line 58: expected statement.
    r “I-I’m waiting for my stupid brother! H-he’s always late.”
                                          ^

File "game/script.rpy", line 60: expected statement.
    “Behind us, a boy, only slightly taller than the girl runs up, book in hand.”
              ^

File "game/script.rpy", line 65: expected statement.
    ub “Ryu! Oh my God! I’m so sorry! I was reading a romanc-”
           ^

File "game/script.rpy", line 67: expected statement.
    “So… the girl’s name is Ryu.”
                               ^

File "game/script.rpy", line 69: expected statement.
    r “Romance? You’re into that kinda stuff, Kokei?”
              ^

File "game/script.rpy", line 71: expected statement.
    “His name is Kokei… They look similar, they must be siblings.”
                                         ^

File "game/script.rpy", line 73: expected statement.
    “I hope I make a good impression.”
                                    ^

File "game/script.rpy", line 75: expected statement.
    k “I mean… the book I’m reading is getting really-”
                                                       ^

File "game/script.rpy", line 77: expected statement.
    r “Ugh… I don’t need to know the details! Let’s just… go to school… idiot!”
                                            ^

File "game/script.rpy", line 79: expected statement.
    “I discreetly follow behind them, walking towards the bus stop.”
                         ^

File "game/script.rpy", line 81: expected statement.
    y “S-so, this is our bus?”
           ^

File "game/script.rpy", line 83: expected statement.
    “Ryu looks taken aback.”
                          ^

File "game/script.rpy", line 85: expected statement.
    r “W-were you… FOLLOWING us?”
                               ^

File "game/script.rpy", line 87: expected statement.
    y “N-no… I… knew where the bus stop was… I just…”
                                                     ^

File "game/script.rpy", line 89: expected statement.
    “Kokei looks like he wants to say something. He hesitates, then whispers in Ryu’s ear.”
                                               ^

File "game/script.rpy", line 91: expected statement.
    r “Gah! Kokei!”
          ^

File "game/script.rpy", line 93: expected statement.
    r “W-what if I don’t wanna be nice, huh? Did you think of that, huh? Huh?
              ^

File "game/script.rpy", line 95: expected statement.
    k “Ryu… please… compose yourself!”
                                    ^

File "game/script.rpy", line 97: expected statement.
    r “Gah!”
          ^

File "game/script.rpy", line 99: expected statement.
    k “I-I’m Kokei… nice to meet you.”
                                    ^

File "game/script.rpy", line 102: expected statement.
    y “Hello, Kokei! Nice to meet you as well!”
            ^

File "game/script.rpy", line 104: expected statement.
    r “Stop chit-chatting, the bus is gonna be here soon!”
                         ^

File "game/script.rpy", line 106: expected statement.
    “I can already tell that Ryu’s bossy.”
                                        ^

File "game/script.rpy", line 108: expected statement.
    “The bus arrives shortly after. We all board.”
                                  ^

File "game/script.rpy", line 115: expected statement.
    “I missed the bus. Might as well skip school today.”
                     ^

File "game/script.rpy", line 117: expected statement.
    {b}Welp. Go back to sleep I guess. Sleep end?? I dunno, you did this..{/b}
           ^

Ren'Py Version: Ren'Py 6.99.13.2919

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Expected Statement and Menuitem Errors

#2 Post by Remix »

Perhaps you'd be kind enough to post some of the code too...
Frameworks & Scriptlets:

User avatar
jacobjumper
Regular
Posts: 44
Joined: Tue Jan 07, 2014 9:45 pm
Projects: Familiarity
Organization: Airheart
Location: Houston
Contact:

Re: Expected Statement and Menuitem Errors

#3 Post by jacobjumper »

Did you copy and paste this somewhere else, with the quotes? Sometimes the editor considers those quotes "invalid", causing this issue.

User avatar
natcreates
Newbie
Posts: 3
Joined: Thu Dec 14, 2017 4:40 am
Projects: Ctrl V
Organization: (we're working on it)
Tumblr: natcreatesstuff
Soundcloud: natcreates
Location: U.S.
Contact:

Re: Expected Statement and Menuitem Errors

#4 Post by natcreates »

Remix wrote: Thu Dec 14, 2017 5:16 am Perhaps you'd be kind enough to post some of the code too...
Totally forgot, sorry. Here's the original code:

Code: Select all

## declare characters
define y = Character(“You”)
define w = Character(“Wibourne”)
define r = Character(“Ryu”)
define k = Character(“Kokei”)
define j = Character (“Journey”)
define l = Character (“Lukas”)
define m = Character (“Mom”)
define ug = Character (“Unknown Girl”)
define ub = Character (“Unknown Boy”)

## game start
label start:
    play music “stheme.mp3”

    scene black
    With fade

    “My alarm buzzes. Why won’t it just shut off?” 
    “They could at least make them be.. Y’know.. Quieter?”
    “If I keep up this attitude, I’ll never manage to wake myself up.”
    y “Shut up already!”

    menu: 
      “Wake up.”
         jump wakeup
      “Sleep in.”
         jump sleepin
label wakeup:
    “Ugh. Fine. I guess I have to actually wake up.”
    “Life would be so much better if I could sleep… forever…”
    m “IT’S 6AM! TIME TO GET UP!”
    y “Alright, alright! I’m up!”
    “I turn off my alarm.”
    y “Welp. Time to get dressed.”
    “I get dressed in the my casual clothes.”
    “No time for breakfast - I gotta catch the bus!”
    show busstop.png
    with fade
    show ryu at left
    with fade
    “I head towards the bus stop, waiting nearby, there’s a girl also wearing the Kirakira school uniform.”
    “Maybe she’s my classmate.”
    ug “Where is he!?”
    “She looks over at me, embarrassed.”
    ug “Gah! S-Sorry.”
    y “No-no It’s… okay.”
    r “I-I’m waiting for my stupid brother! H-he’s always late.”
    “Behind us, a boy, only slightly taller than the girl runs up, book in hand.”
    show kokei at right
    with fade
    ub “Ryu! Oh my God! I’m so sorry! I was reading a romanc-”
    “So… the girl’s name is Ryu.”
    r “Romance? You’re into that kinda stuff, Kokei?”
    “His name is Kokei… They look similar, they must be siblings.”
    “I hope I make a good impression.”
    k “I mean… the book I’m reading is getting really-”
    r “Ugh… I don’t need to know the details! Let’s just… go to school… idiot!”
    “I discreetly follow behind them, walking towards the bus stop.”
    y “S-so, this is our bus?”
    “Ryu looks taken aback.”
    r “W-were you… FOLLOWING us?”
    y “N-no… I… knew where the bus stop was… I just…”
    “Kokei looks like he wants to say something. He hesitates, then whispers in Ryu’s ear.”
    r “Gah! Kokei!”
    r “W-what if I don’t wanna be nice, huh? Did you think of that, huh? Huh?
    k “Ryu… please… compose yourself!”
    r “Gah!”
    k “I-I’m Kokei… nice to meet you.”
    y “Hello, Kokei! Nice to meet you as well!”
    r “Stop chit-chatting, the bus is gonna be here soon!”
    “I can already tell that Ryu’s bossy.”
    “The bus arrives shortly after. We all board.”
    "(to be continued)"
    return

label sleepin
    “I missed the bus. Might as well skip school today.”
    show sleepinend.png
    return

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Expected Statement and Menuitem Errors

#5 Post by xavimat »

The quotes are the problem: “ is not "
When using Word/Writer or other programs, the simple quotes " ' are changed to pretty ones (typographical ones): «» “” ‘’
But python/Ren'Py needs the simple ones: ", '
Change them (you can do it quickly with "find&replace all") and probably it'll be fine.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
natcreates
Newbie
Posts: 3
Joined: Thu Dec 14, 2017 4:40 am
Projects: Ctrl V
Organization: (we're working on it)
Tumblr: natcreatesstuff
Soundcloud: natcreates
Location: U.S.
Contact:

Re: Expected Statement and Menuitem Errors

#6 Post by natcreates »

Alright, we've got less errors now that I fixed up the quotations issue.

Code: Select all


File "game/script.rpy", line 39: end of line expected.
    show busstop.png
                ^

File "game/script.rpy", line 82: end of line expected.
    show sleepinend.png
                   ^

Ren'Py Version: Ren'Py 6.99.13.2919
It seems to have an issue with the pictures.. at least there isn't as much of an error code this time around. I think the periods may be causing an issue somehow?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2397
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Expected Statement and Menuitem Errors

#7 Post by Ocelot »

Image path needs to be in quotes: show "busstop.png"
< < insert Rick Cook quote here > >

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Expected Statement and Menuitem Errors

#8 Post by xavimat »

If you put the images inside the "images" folder, Ren'Py will find them only with the name. Quotes and extensions (.png, .jpg) not needed.

Code: Select all

show busstop
show sleepinend
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: No registered users