Invalid Syntax Error with If statement
So when i try to run this, i get Invalid syntax on the second if
statement, highlighting the colon. I don't understand why this is
occurring, as far as i can see, they're basically the same. So why does
the second if statement return invalid syntax but the first doesnt?
for event in pygame.event.get():
if event.type == MOUSEBUTTONDOWN :
if ROption1Exists == True:
rx, ry = event.pos
if rx >= (100*((X+3)+1)) and rx <= (100*((X+3)+2)) and ry >=
(100*(Y+1)) and ry <= (100*(Y+2)):
print('babies')
VarReset()
Pos = ((X+3), Y)
if ROption2Exists == True:
rx, ry = event.pos
if rx >= (100*((X-3)+1)) and rx <= (100*((X-3)+2)) and ry >=
(100*((Y+1)) and ry <= (100*(Y+2)):
print('babies')
VarReset()
Pos = ((X-3), Y)
No comments:
Post a Comment