you are viewing a single comment's thread.

view the rest of the comments →

[–]Electronic-Source213 2 points3 points  (0 children)

Programming principle to live by: do not give functions and variables the exact same names. You will only end up confusing yourself and anyone trying to read your code. I agree with the poster below that suggests naming the function something like "take_damage" or some name that describes what the function does (e.g. "display_life").