Jump to content


Photo

Little Chat Bot im starting to create...


  • Please log in to reply
6 replies to this topic

#1 Sk8erkid

Sk8erkid
  • Hosted
  • 7 posts

Posted 08 January 2004 - 04:17 AM

dammit, it compiles now but ignores the IF...

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;
}

:)

#2 Sk8erkid

Sk8erkid
  • Hosted
  • 7 posts

Posted 08 January 2004 - 04:07 AM

ah nevermind i forgot to add "#define no 0"

#3 the_kid

the_kid

    L337 Pwnerer of N00bs

  • Project Team
  • 1,734 posts
  • Location:La$ Vega$, NV
  • Projects:freelancing between what interests me
  •  + TRIPLEhelix

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 Mastermind

Mastermind

    Server Technician

  • Undead
  • 7,014 posts
  • Location:Cambridge, MA
  • Projects:MasterNews 3
  •  The Man Behind the Curtain

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?
:shiftee:
Posted Image

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.

Too cute! | Server Status: If you can read this, it's up |

#5 Sk8erkid

Sk8erkid
  • Hosted
  • 7 posts

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 vice

vice
  • New Members
  • 6 posts

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 the_kid

the_kid

    L337 Pwnerer of N00bs

  • Project Team
  • 1,734 posts
  • Location:La$ Vega$, NV
  • Projects:freelancing between what interests me
  •  + TRIPLEhelix

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