Line is indented, but the preceding jump 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
Guestify
Newbie
Posts: 3
Joined: Wed Jan 17, 2018 4:11 pm
Github: Guestify
Contact:

Line is indented, but the preceding jump statement statement does not expect a block.

#1 Post by Guestify »

File "game/script.rpy", line 142: Line is indented, but the preceding jump statement statement does not expect a block. Please check this line's indentation.
"No making a club is a pain in the ass! (so is this menu)":
^

Code: Select all

 menu: 
             "Okay we will make a club.":
                    jump choice1_yes
        
        

                       "No making a club is a pain in the ass! (so is this menu)":
                                                                 jump choice1_no
        
        

label choice1_yes:
    $menu_flag = True
    m "Thanks I always dreamed of owning a club!"
    jump choice1_done
        
        
    label choice1_no:
    $ menu_flag = False
    return
    jump choice1_done
    
    
    
    label choice1_done:
        

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Line is indented, but the preceding jump statement statement does not expect a block.

#2 Post by Donmai »

"preceding jump statement does not expect a block" refers to the line

Code: Select all

jump choice1_yes
because the indentation of the following menu option is wrong. You need both menu options at the same indentation level. Try it this way:

Code: Select all

menu: 
    "Okay, we will make a club.":
        jump choice1_yes
        
    "No, making a club is a pain in the ass!":
        jump choice1_no
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: No registered users