How to know if a variable is more than 0?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jan Gabriel

I wanna to make something so that if a variable has more than 0 of something then it will reduce 1 on that variable

:bust_in_silhouette: Reply From: jgodfrey

Something like this should work (theVar would be your variable name)

if theVar > 0: theVar -= 1