Hi. I am working on my first ever text adventure program. It has no errors, but like it says stuff wrong. If i put in left, it thinks I went right. run the damn program and see what i mean! btw, i am only 1/3 done wit it.-
Code:#include <iostream> using namespace std; int main() { char way1; char way2; char way3; char way4; cout << "Welcome to Ryan's First Text Adventure Game!"; cout << "\nLets start shall we?!"; cout << "\nOne day, you and your friend were bored and decided to go have some "; cout << "\nfun. There was a house that people said was haunted on the biggest "; cout << "\nhill in your town. So you guys went up there and knocked. The door "; cout << "\ncreaked open but no one was there! So you walked in and the door "; cout << "\nslammed behind you and locked! So here is where it all starts, the "; cout << "\nescape from the House From Hell...."; cout << "\nWell, you guys decide to start looking around. Should you start left, "; cout << "\nright, or straight?(l/r/s): "; cin >> way1; if(way1 == 'l') cout << "\nYou guys walk through the door to the left and see 2 more doors."; cout << "\nDo you want to guys want to go left again or straight ahead?(l/s)"; cin >> way2; if(way2 == 'l') cout << "\nYou guys go left and a demon appears. Do you want "; cout << "\nto fight it or run?(f/r): "; cin >> way4; if(way2 == 's') cout << "\nYou guys go straight into a Great Hall. There is 1 door "; cout << "\non each side. Do you guys go left or right?(l/r): "; cin >> way3; if (way3 == 'l') cout << "\nYou go left and there is corpses and bones and skulls everywhere!"; cout << "\nThey come alive and kill you guys! O well, Thanks For Playing!" << endl; if(way4 == 'f') cout << "\nYou guys start to fight it but it breathes fire everywhere and you all burn and die. "; cout << "\nThanks for playing!" <<endl; if(way4 == 'r') cout << "\nYou all start to run away but so fast you can't see and fall down a pit. "; cout << "\nYou guys stay and rot there. Ughh!! Thanks for playing!" << endl; system("pause"); return 0; }



LinkBack URL
About LinkBacks


