Illegal else without matching if?

Hello guys,
I am a new c++ user and I am having trouble figuring out this error that im given. I am creating a funny choose your own adventure kind of game, and i don't know why i am receiving this error.
The error is on line 35. If someone could help it could really be appreciated!
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
48
 #include "stdafx.h"
#include <iostream>
#include <string>

using namespace std;

int main()
{
cout<< "You are walking in the woods after a wonderful night with your family. You decide to go off the path to see the beautiful scenery.";
cout<< "As you aimlessly walk through the terrain, you turn to your left. You see a dark shadow running towards you. Then you recall the CNN story";
cout<< "you just saw on TV. The Booty Bandit who has escaped from Booty Rehab is after your Booty! What's your next move?" << endl;;
cout<<"Run" << endl;
cout<< "Surrender" << endl;
cout<<"GC (Give Consent)"<<endl;


string Run;

 cin>> Run;

 if(Run == "Run")
 {
 
cout<< "Thankfully you didn't skip leg day so you dash to the left, narrowly escaping his fingers in the booty. You sprint until you see";
cout << "an abondoned trap house. In the trap house you turn to your left and see Fetty Wap and his trap woes! What will you do next?" <<endl;
cout << "Join" << endl;
cout << "Keep Running" << endl;
 }

else if (Run == "surrender");
{
cout<< "Wow you suck, your booty isn't even worth running? Well shit your screwed :D"<<endl;
}

else if (Run == "GC");
{
cout<< "The booty warrior decides that he wants the thrill of the chase, and instead of accepting the booty he just leaves." << endl;
}
  

    cout << "Nope, Chuck Testa" << endl;


system("pause");

return 0;

}
take out the semicolon on lines 35 and 30, also for "pause" you need the <cstdlib> included in your program. I don't think you need the first line of code #include "stdafx.h" for this program.
Lines 30,35: The ; at the end of line terminates the if statement. Remove the ;

Remove the semicolon at the end of your else if statements on lines 30 and 35.
Topic archived. No new replies allowed.