Health Bar

Well, it’s more specific than you are. You included a screenshot of a class instead of using the CODE tags as it is requirement on the forums. You can find help here, how to use CODE tags .
You also failed to include the error message in your OP so we can only guess what the problem is.
In your screenshot, on the 23rd line, you have a command health -= 2; and then you check it on the 26th. But there is no declaration of health variable anywhere, you have currHealth instead.

1 Like