Page 1 of 1

Error; expected statement

Posted: Tue Apr 03, 2018 4:42 am
by TigerAlpaca
This is an error I've gotten and I would like some help to solve it.

This is the error-

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 316: expected statement.
    "I couldn't help but tense at his touch." :
                                              ^

Ren'Py Version: Ren'Py 6.99.14.1.3218
Tue Apr 03 09:38:38 2018
And this is the code it occurs in-

Code: Select all

"I couldn't help but tense at his touch." :
            
             menu:
                
                "Push him off":
                
                  jump neutralpath1
                  
                "Do nothing":
                
                  jump falsepath2
                  
I had to put the colon to prevent another error, but now it's made this one. Some help, please?

Re: Error; expected statement

Posted: Tue Apr 03, 2018 6:07 am
by korova
Indentation "rule" : Indent after a colon, don't indent when there is no colon, put colons only when creating blocks is mandatory.

Code: Select all

"I couldn't help but tense at his touch."  ## Remove this colon :
            
menu:  ## Don't indent this menu
                
    "Push him off":
                
        jump neutralpath1
                  
    "Do nothing":
                
        jump falsepath2
                  

Re: Error; expected statement

Posted: Sat Apr 21, 2018 8:27 am
by TigerAlpaca
korova wrote:
Tue Apr 03, 2018 6:07 am
Indentation "rule" : Indent after a colon, don't indent when there is no colon, put colons only when creating blocks is mandatory.

Code: Select all

"I couldn't help but tense at his touch."  ## Remove this colon :
            
menu:  ## Don't indent this menu
                
    "Push him off":
                
        jump neutralpath1
                  
    "Do nothing":
                
        jump falsepath2
                  
Thanks, I'll try that now and see if it works

It works, thanks.