Problem with if statement

I am trying to have a if and else if statement within a if statement but I keep getting an error on the else if "Error: expected a statement;"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  #include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <string>
#include <time.h>

using namespace std;

int main()
{
	srand (time(NULL));
	string userName;
	string answer;
	int ammo = 10;
	int health = 10;
	int healthLchance = rand() %100+1;

	cout << "Intro Text Here\n";
	cout <<"Enter Character Name Here\n";
	cin >> userName;

	cout <<"Event 1 Here\n";
	cin >> answer;

	if (answer == "shoot")
	{
		ammo--;
		cout <<"You have " <<ammo<< " bullets left\n";

	}
	else if (answer == "run")
	{
		if (healthLchance < 50);
		{
			health--;
			cout <<"You try your hardest but one of the zombies hites you, you now have" <<health<< " left";
		}
		else if (healthLchance > 50);
		{
			cout <<"You get away unscathed, you still have "<<health<< " health\n";;
		}
	}
	


	system ("pause");
}
woops, had a ; on the if statement
Topic archived. No new replies allowed.