I have triple checked the syntax on this python module statement, and it is NOT working…
correct = 0
ahtriggercount = 0
def IsCorrect():
#Increase correct count.
correct = correct + 1
#Lower autohelp trigger count.
if ahtriggercount > 0:
ahtriggercount = ahtriggercount - 1
The general “syntax error” (no further information is being given by the IDE) is being thrown at…
if ahtriggercount > 0:
What is wrong? Why can’t we access the ahtriggercount variable?
You need to tell python that you’re accessing a global variable. Like this:
Global variables are read-only by default unless you use the global declaration.
You also had a whitespace issue. There were some strange spaces on one of the lines. When I deleted the spaces and added them again, I stopped getting IndentationError.