Requiem wrote:Aha, I see what you mean.
I'll give it a shot in just a moment and edit this post with the result. But the if statement is used much further down from where the actual $ Yes = True is, in a totally different label. Is that the problem?
Honestly, while all the stuff about using variables and case-sensitivity is worth knowing, and would have caused you problems, they wouldn't have caused the actual error you got. A syntax error means that Ren'Py/Python couldn't even read a valid statement out of the line, and happens when the script is first read in by the program... while the problems you'd get from case-sensitivity and not having initialised variables would happen after Ren'Py has made sense of the line, and only actually come out when Ren'Py tries to run that particular line of your script.
Unfortunately, I can't see anything in the quoted line in your first post that would be a syntax error, and - as vaanknight notes - there's nothing wrong with your indentation if the text you showed is verbatim from your script file.
Two things come to mind:
- Firstly, Python depends quite heavily on indentation, so if you have any funny characters (carriage-returns without newlines, maybe, that your editor isn't showing? Odd non-normal space characters?) then they might potentially mess up the parsing. Did you copy and paste any of your script from a website or anything like that? I know I've had trouble in the past when I've copied examples from the web and it's turned out that they had weird invisible layout/formatting characters in. If you have, it might be worth typing a copy of the lines out by hand, and deleting the originals
- Secondly, there's a chance that something on a different line could cause a problem that isn't obvious just from the traceback. With respect to the error you're having now, could you post a chunk of the script maybe ten lines either side of the line with the error? As it is, there's no reason you should have a problem with the small snippet you posted, so long as all the other lines are fine.
(I'm not actually entirely sure it's possible to have a syntax error in Python caused by a problem on another line, but I know it's possible in other languages, so it's worth a look.)