Hello i'm stuck on something in my code most of it has been removed so i dont really want people taking my idea ( sorry might seem sad but still )
my problem is from the first if everything works on the inside of that but the else if and the end of the first one and the code doesn't work even if i write the things to trigger it, it just assumes its "yes";
http://puu.sh/3zYoC.png heres a picture of the problem
i typed no but it still continues why isn't it saying " the monster got away " ?
attackAnswer is string not a char so this should work
if( attackAnswer == "Yes" || "yes" || "y" || "Y" )
This isn't doing what you think it is doing. The only conditional check is the first clause; the rest are all separate, meaning that attackAnswer has nothing to do with them. This line will always evaluate to true.
You must write out attackAnswer for every condition you want to check for: if( attackAnswer == "Yes" || attackAnswer == "yes" || ... )