if (TrueName==no) { cout<< "You lying little... ahem.. whats your REAL name then?"<<endl; cin>> RealName; cout<<"UberBot: Oh, Sorry... Anyways, whats up?"<<endl; cin>> WhatsUp; } else { cout<<"UberBot: Oh, Sorry... Anyways, whats up?"<<endl; cin>> WhatsUp; }
Little Chat Bot im starting to create...
Started by Sk8erkid, Jan 08 2004 04:17 AM
6 replies to this topic
#1
Posted 08 January 2004 - 04:17 AM
dammit, it compiles now but ignores the IF...
#2
Posted 08 January 2004 - 04:07 AM
ah nevermind i forgot to add "#define no 0"
#3
Posted 08 January 2004 - 06:08 AM
good luck, but I think someones peaken up your skirt here, you need to be a bit more patient, I don't think you are advanced enough yet, but we shall see
#4
Posted 08 January 2004 - 03:53 PM
You most likely need to put the no in quotes, otherwise, it is looking for a variable. When you say it ignores the if, what exactly does it display?
Too cute! | Server Status: If you can read this, it's up |Well, when it comes to writing an expository essay about counter-insurgent tactics, I'm of the old school. First you tell them how you're going to kill them. Then you kill them. Then you tell them how you just killed them.
#5
Posted 09 January 2004 - 12:56 AM
i tried putting no in "" but it still just skips the IF and displays the else statement. Ill explain the situation, the chat dude asks your name, then He laughs and says, "is that your REAL name?!" and i want to if you say no then it uses the IF in the previous post but if anything else than he just continues.. and from what i know this should work? this is the code i have at the top...some might be unneeded?
#include<iostream> int main(int argc, char *argv[]) { char quit; while (quit != 's') { char Alright[256]; int Path; char PlayerName[256]; char TrueName[256]; char RealName[256]; char WhatsUp[8]; char WhereFrom[256]; char Ok[4]; #define no 0
#6
Posted 27 January 2004 - 09:00 PM
well first off. macros are awefull. try to stay away from them, especially at this stage of your programming knowledge. instead try using boolean variables. they are far simpler to use, a simple TRUE or FALSE is all.
#7
Posted 28 January 2004 - 05:24 AM
he scraped this one... because he realized that I was right, and he isn't "pro" enough to make a chat bot.... so now he's trying to make a game... we shall see, we shall see..
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users