"Preceding say statement statement does not expect a block"

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
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

"Preceding say statement statement does not expect a block"

#1 Post by Henriquedematos »

Well, I tried to make a novel on Ren'Py for some time, but due to complications with many other projects, I ended up stopping it. Today I've decided to start over, and was faced with this problem. I was trying to make a menu choice like this:

Code: Select all

menu:

      "Obligations first: It's not easy, but I must go.":
         jump choice1_no

      "Yeah... I'm better off staying here.":
         jump choice1_yes

label choice1_no:
    
    "It's definitley the best choice to get out of this bed, for my own good."
    "At first I lack the energy to even perform the most basic body movements."
    "I just lay down, staring at the ceiling of my small room, trying to keep my eyes open."
    "After one or two minutes, I start pulling away the sheets, and slowly drag myself out of bed."
    "I move my right leg out of it, and slowly place my bare foot on the carpet."
    "With some effort, I do the same with my left leg, as I slowly rise and begin to assume a sitting stand on the side of bed."
    "I yawn as I extend my arms into the air, thinking that at least the first step is complete."
    "Now for the second step: To change from my pijamas to my normal clothing."
    "They're right over there, by the chair. I just need to reach them..."
    "Yes, all I need to do is just walk over to them..."
    "No, my... my legs are still too tired to perform such a task, maybe if I extend my arm I can reach them..."
    "Damnit... No, I can't..."

menu:

      "Goddamnit, I gotta man up and carry on.":
         jump choice2_no

      "Screw it, I'll just drag myself back to bed instead.":
         jump choice2_yes
         
label choice2_yes:
       
    "I slowly crawl back under the sheets, knowing I've made a pretty bad choice but really not caring much."
         jump choice1_yes
   
label choice1_yes:
   
    "This can potentially affect my grade, I'm really lost in Logic and I know this less one lecture, but my tiredness spoke louder."
    "I slowly closed my eyes and, in just a matter of seconds, was in deep sleep."
    
label choice2_no:
    "In what seems like an incredible effort from my sleep-stoned self, I'm able to get up and walk over to my clothes, grabbing them."
And I was faced with the following error:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 66: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
jump choice1_yes
^
Any help? Sorry if I'm missing something blatantly obvious, I haven't used this in a while and I wasn't that good back then to begin with :(

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

Re: "Preceding say statement statement does not expect a blo

#2 Post by Alex »

This line doesn't need to be extra indented, so fix it

Code: Select all

label choice2_yes:
       
    "I slowly crawl back under the sheets, knowing I've made a pretty bad choice but really not caring much."
    jump choice1_yes
http://www.renpy.org/wiki/renpy/FAQ#How ... _blocks.3F

User avatar
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

Re: "Preceding say statement statement does not expect a blo

#3 Post by Henriquedematos »

Alright, so I removed the "jump choice1_yes" option and it worked, thanks!

Yet, now I'm faced with another problem: I want this line

Code: Select all

label choice1_yes:
   
    "This can potentially affect my grade, I'm really lost in Logic and I know this less one lecture, but my tiredness spoke louder."
    "I slowly closed my eyes and, in just a matter of seconds, was in deep sleep."
to later be followed in the story, instead of just skipping over to this line, which is the opposite event:

Code: Select all

label choice2_no:
    "In what seems like an incredible effort from my sleep-stoned self, I'm able to get up and walk over to my clothes, grabbing them."
How do I do that? How do I stop the game from automatically going to the next line and instead redirect it to another one? :|

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

Re: "Preceding say statement statement does not expect a blo

#4 Post by Alex »

Just add another jump to whatever label you need at the end of label choice1_yes.
http://www.renpy.org/doc/html/label.html

User avatar
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

Re: "Preceding say statement statement does not expect a blo

#5 Post by Henriquedematos »

Okay, it did for now, thanks a lot!

Post Reply

Who is online

Users browsing this forum: Google [Bot]