So I have this code
score = 0
def on_button_pressed_a():
score = score + 1
print(score)
input.on_button_pressed(Button.A, on_button_pressed_a)
And I know that the problem is the score = 0 being outside the subroutine. However if I put score = 0 into the subroutine whenever the button is pressed it will always return to 0. How can i fix this (I cant use classes btw)