Expected statement error[Solved]

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
Red Alert
Newbie
Posts: 3
Joined: Sat Aug 04, 2018 5:32 pm
Contact:

Expected statement error[Solved]

#1 Post by Red Alert »

Hello there, I was recently working on a small project of mine when these errors popped up,

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
                 ^

File "game/script.rpy", line 270: expected statement.
    "Slow down":
               ^

File "game/script.rpy", line 274: expected statement.
    "Speed up":
              ^

File "game/script.rpy", line 291: play requires a file
    play Footsteps
                  ^

File "game/script.rpy", line 311: expected statement.
    "Take the shortcut home":
                            ^

File "game/script.rpy", line 315: expected statement.
    "Go the normal way home":
                            ^

Ren'Py Version: Ren'Py 7.0.0.196
Sat Aug 04 17:27:53 2018
This is my code:

Code: Select all

    menu:

        "she decided to...":
            "Slow down":

                jump slow

            "Speed up":

                jump speed



    label slow:

    nvl clear

    window hide

    scene bg Night sky
    with fade
    window show

    "then she began to hear footsteps walking along with her,"
    play Footsteps
    "she slowed down to see if she was just hearing something. The footsteps stopped as soon as she stopped and when she started walking, the footsteps started walking as well"


    label speed:
    nvl clear

    window hide

    scene bg Night sky
    with fade
    window show

    "She decided to jog a little bit before breaking into a full out sprint."

    "The footsteps began to sprint after her and as she rounded the corner,"
    menu:

        "she decided to...":

            "Take the shortcut home":

                jump shortcut

            "Go the normal way home":

                jump normal



    label shortcut:
    [code/]
    
    I think it's an error of indentation, but I'm not too sure, could anybody help me out with this?
Attachments
CodeError.txt
This is the code I'm talking about
(1 KiB) Downloaded 37 times
Last edited by Red Alert on Sun Aug 05, 2018 2:27 pm, edited 1 time in total.

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 error

#2 Post by Remix »

Indentation...

Code: Select all

    menu:

        "she decided to..." ## this is a caption, so has no colon :
       
        "Slow down": # answers/options are at same level as caption

            jump slow

        "Speed up":

            jump speed
Frameworks & Scriptlets:

Red Alert
Newbie
Posts: 3
Joined: Sat Aug 04, 2018 5:32 pm
Contact:

Re: Expected statement error

#3 Post by Red Alert »

Thank you, I was going crazy over this for a long time, I knew it was an indentation error but I couldn't figure out how to fix it, thank you again

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]