Page 1 of 1

Expected statement error[Solved]

Posted: Sat Aug 04, 2018 5:40 pm
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?

Re: Expected statement error

Posted: Sat Aug 04, 2018 5:51 pm
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

Re: Expected statement error

Posted: Sun Aug 05, 2018 2:27 pm
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