I've been dabbling in Blender's Game Engine, so I thought it was time to take it to the next level and use scripts to control my game, but now I have a problem; I keep getting this error (only printing error message):
mainScript.py, line 28
if PlayerControls.playerMain['isInCover'] == 0
^
SyntaxError: invalid syntax
location: <unknown location>:-1
My code:
def toggleProne():
if PlayerControls.playerMain['isInCover'] == 0
PlayerControls.playerMain['isCrouched'] = 0
PlayerControls.playerMain['isStanding'] = 0
PlayerControls.playerMain['isProne'] = 1
return;
Removing the if-statement and adjusting the indentation (as a result of the removed if-statement) allows the code to be compiled - until it finds the next if statement and errors out.