SetVariable Syntax Error

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
User avatar
DesertFox
Regular
Posts: 196
Joined: Sun Jul 28, 2013 1:29 pm
Completed: Over The Hills And Far Away
Projects: My Little Dictator
Organization: WarGirl Games
Contact:

SetVariable Syntax Error

#1 Post by DesertFox » Thu Oct 15, 2015 11:36 am

When using an imagebutton to set a variable, I'm given a syntax error over the following:

Code: Select all

SetVariable("girl", -=1)
Why is it that '-=' and '+=' don't work as syntax here?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: SetVariable Syntax Error

#2 Post by xela » Thu Oct 15, 2015 12:07 pm

Code: Select all

SetVariable("girl", -=1)
Doesn't make much sense, use:

Code: Select all

SetVariable("girl", girl-1)
Like what we're doing? Support us at:
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]