So, I'm very very new at this, and I'm not quite sure what to do in this scenario. The full error I'm getting is:
An Exception Has Occurred
file "game/script.rpy", line 252 in script
if variable_race = monster:
Syntax Error: invalid Syntax.
This is the portion I think it's referring to:
if variable_race = "monster":
p "{cps=25}Are you [name] [lastname], the monster registered at Threebrach Avenue, apartment block C-16?{/cps}"
jump areyou1_done
else:
p "{cps=25}Are you [name] [lastname], the mage registered at Threebrach Avenue, apartment block C-16?{/cps}"
jump areyou1_done
label areyou1_done:
I can't figure out how to fix it, though. Can anyone help me?
Edit: I figured it out! Sorry for bothering everybody.
I'm having an 'if' statement error - invalid syntax? [SOLVED]
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.
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.
-
SplashyDashyBomBashi
- Newbie
- Posts: 4
- Joined: Thu Nov 08, 2018 12:36 pm
- Contact:
I'm having an 'if' statement error - invalid syntax? [SOLVED]
Last edited by SplashyDashyBomBashi on Fri Nov 09, 2018 11:18 am, edited 1 time in total.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: I'm having an 'if' statement error - invalid syntax?
if variable_race == "monster"
= assigns value
== checks value
= assigns value
== checks value
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: I'm having an 'if' statement error - invalid syntax?
When doing an “if” test, you need two equals signs, not one. One represents an assignment, not a test.
Code: Select all
If variable_race == “monster”:
Etc, etc
Who is online
Users browsing this forum: Google [Bot], span4ev
