SyntaxError: invalid syntax

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
Ezeze
Newbie
Posts: 7
Joined: Wed Aug 20, 2014 8:00 pm
Contact:

SyntaxError: invalid syntax

#1 Post by Ezeze »

I cannot figure out what could be causing this error :evil:

Whenever I get to the point where a menu should open up, I get this error instead
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/Raymond.rpy", line 387, in script
"Draw your sword" if RChassword == "false":
SyntaxError: invalid syntax (game/Raymond.rpy, line 445)

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/Raymond.rpy", line 387, in script
"Draw your sword" if RChassword == "false":
File "C:\Program Files (x86)\renpy-6.17.7-sdk\renpy\ast.py", line 1363, in execute
choice = renpy.exports.menu(choices, self.set)
File "C:\Program Files (x86)\renpy-6.17.7-sdk\renpy\exports.py", line 622, in menu
if renpy.python.py_eval(condition) ]
File "C:\Program Files (x86)\renpy-6.17.7-sdk\renpy\python.py", line 1416, in py_eval
return eval(py_compile(source, 'eval'), globals, locals)
File "C:\Program Files (x86)\renpy-6.17.7-sdk\renpy\python.py", line 477, in py_compile
raise e
SyntaxError: invalid syntax (game/Raymond.rpy, line 445)

Windows-7-6.1.7601-SP1
Ren'Py 6.17.7.521
Gahad 0.0

Here are the lines of text
386label RCornationMenu:
387 menu:
388 "Draw your sword" if RChassword == "false":
389 $ RChassword = "true"
390 "You draw your sword from its sheath, thankful that it's included in your formal uniform."
391 call RCRoundAdvance
392 jump RCornationMenu

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: SyntaxError: invalid syntax

#2 Post by PyTom »

What is line 445?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: SyntaxError: invalid syntax

#3 Post by PyTom »

What is line 445?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Ezeze
Newbie
Posts: 7
Joined: Wed Aug 20, 2014 8:00 pm
Contact:

Re: SyntaxError: invalid syntax

#4 Post by Ezeze »

Sorry for the late response - here:
444 "Charge [M]'s attacker" if RCLocation == "stage" and RMAlive == "true" and RCProtectingM = "false":
445 $ RCProtectingM = "true"
446 "You rush King [M]'s attacker and your shoulder connects solidly with him. He lets out an 'oof' and tumbles to the ground beneath you, dropping his sword in the process."
447 call RCRoundAdvance
Your help is really appreciated, this freaking error is making me tear my hair out x.x

User avatar
korova
Veteran
Posts: 217
Joined: Sat Jun 27, 2009 5:15 pm
Completed: Ivy, Chocolate, Time, Clair Obscur
Projects: Writing exercises, The House [Nano18]
Tumblr: korova08
itch: korova
Location: Normandie, France
Contact:

Re: SyntaxError: invalid syntax

#5 Post by korova »

It may have nothing to do with your error, but don't you lack a "=" in line 444 at the end ?
444 "Charge [M]'s attacker" if RCLocation == "stage" and RMAlive == "true" and RCProtectingM = "false":

Ezeze
Newbie
Posts: 7
Joined: Wed Aug 20, 2014 8:00 pm
Contact:

Re: SyntaxError: invalid syntax

#6 Post by Ezeze »

korova wrote:It may have nothing to do with your error, but don't you lack a "=" in line 444 at the end ?
444 "Charge [M]'s attacker" if RCLocation == "stage" and RMAlive == "true" and RCProtectingM = "false":
.....

...........

:oops:

That fixed it. Thank you.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], MisterPinetree