Function being called when statement untrue?

The Die() function is being called when the if() statement it is in, is untrue.

 function DoDamage () {
	if (hitPoints > 0)
		hitPoints -= damageAmount;
		time = 2.0;		
	if (hitPoints <= 0)

Oh boy…
Forgot my curly braces…
Well, I’m embarrassed… hahaha

So what was happening was, since I had no curly braces, the 1st if() statement was the performing of the left overs of the 2nd.

Don’t forget you’re curly braces people!