So I just started using the Goto command and I have some trouble with it. I will post my code and explain the problem.
cout<<"So here we are at your first choice."<<endl;
cout<<"-Do you 'stand' there and TRY to get me out of your head..."<<endl;
cout<<"Or do you 'follow' the strange noises coming from the door?"<<endl;
string sof;
firsttp:
cout<<"-";
getline (cin, sof);
if ((sof == "stand")||(sof=="Stand")||(sof=="follow")||(sof=="Follow"))
{
if ((sof=="follow")||(sof=="Follow"))
{
cout<<"*You get up and go to the door*"<<endl;
cout<<"-Well thats it for now xD"<<endl;
}
else
cout<<"*5 hours later*"<<endl;
cout<<"-So, not getting anywhere, huh?"<<endl;
cout<<"Let me just warp you back a few hour so you can make the 'right' choice."<<endl;
cout<<"*You feel a strange buzz*"<<endl;
cout<<"So here we are at your first choice."<<endl;
cout<<"-Do you 'stand' there and TRY to get me out of your head..."<<endl;
cout<<"Or do you 'follow' the strange noises coming from the door?"<<endl;
goto firsttp;
}
else
cout<<"-Well I may be able to talk to you freely but your connection to me is weak."<<endl;
cout<<"I can only get 'certain' words... if you know what I mean."<<endl;
cout<<"Could you please repeat your choice?"<<endl;
goto firsttp;
So the bigger bracket goto works fine and sends me in the beggining where i want it the second one does as well if the conditions (follow,Follow) are not met. But when I type in follow or Follow it gives me the text that I intend ( You get up and go to the door) but it still gets to the first goto it finds and sends me back to the beggining. How do I make it so that only when the Else command is triggered goto is triggered aswell and not to trigger it always ?