I have this code to redirect to the home if it doesnt equal any of these. Whatever you put in it will output "Sorry, this is not a valid answer, please try again"
1 2 3 4 5
if(Answer!=("Home","Shop","Fight")){
cout << "Sorry, this is not a valid answer, please try again!";
Sleep(1000);
Answer="Home";
}
That syntax on line 1 is legal C++, but it almost certainly isn't doing what you want to do. Do you understand what the comma operator actually does in C++?