Hello every1 i`m new here and also new to C++, i really need some1 to help me spot what went wrong in my code , at the end of the code the braces dont close properly. I have been scanning through my code for over an hour and still cant find what i did wrong.
i know this is a very dumb problem and i should find the problem eventually if i continue staring at my code. But my assignment deadline is coming i really cant afford to waste precious time trying to figure out what went wrong.
any helpful reply is very much appreciated C:
PS:i know my code is ridiculous, please dont laugh...
Code:while (loop3 == 1) { if (room == 1) { while (northwingloop == 1) { system("cls"); northwing(); cout << "\n\n[1] - examine bookshelf\n\n" << "[2] - examine table\n\n" << "[3] - examine room\n\n" << "[4] - move forward\n\n"; cin >> i; if (i == 3) { system("cls"); northwing(); cout << "There is nothing suspicious here.\n\n"; cin.ignore(); cin.get(); } if (i == 2) { if (tablestatus == 8) { system("cls"); torchlight(); cout << "\n\nYou found a torchlight on the table.\n\n" << "[1] - Take the torchlight\n\n" << "[2] - Do nothing\n\n"; cin >> a; tablestatus = itemstatus(); } else if (tablestatus == 9) { system("cls"); northwing(); cout << "\n\nJust a regular table.\n\n"; cin.ignore(); cin.get(); } } if (i == 1) { system("cls"); northwing(); cout << "\n\nJust a few boring game programming books.\n\n"; cin.ignore(); cin.get(); } if (i == 4) { northwingloop = 2; room = 2; } } } if (room == 2) { while (loop == 1) { loop2 = 1; system("cls"); hallway(); cout << "\n\n[1] - examine left door\n\n" << "[2] - examine right door\n\n" << "[3] - examine hallway\n\n" << "[4] - move forward\n\n" << "[5] - go back\n\n"; cin >> i; if (i == 3) { if (batterystatus == 8) { system("cls"); battery(); cout << "\n\nYou found a battery on the floor.\n\n" << "[1] - Take the battery\n\n" << "[2] - do nothing\n\n"; cin >> a; batterystatus = itemstatus(); loop = 1; } if (batterystatus == 9) { system("cls"); hallway(); cout << "\n\nThere is nothing suspicious here\n\n"; cin.ignore(); cin.get(); loop = 1; } } if (i == 1 || i == 2) { while (loop2 == 1) { system("cls"); door(); cout << "\n\n[1] - open door\n\n"; cout << "[2] - dont open door\n\n"; cout << "[3] - go back to hallway\n\n"; cin >> i; if (i == 3) loop2 = 2; else if (i == 2) loop = 1; else if (i == 1) { loop = 2; loop2 = 2; system("cls"); dooropen(); } } } if (i == 5) { northwingloop = 1; room = 1; } } } } }



LinkBack URL
About LinkBacks


