1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

1 < 2 .. lol nope.. wtf help lol

Discussion in 'C, C++, C#' started by Ampix0, Jan 15, 2012.

  1. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    Ok so I am just adding some error checks into my bot, making sure the nummbers that people enter make logical sense. this SHOULD check to make sure the second number is larger than the first. but the message goes off anyway. take a look

    i.imgur/K34mP.jpg
     
  2. Sprouts

    Sprouts Regular Member

    Joined:
    Mar 20, 2010
    Messages:
    461
    Likes Received:
    324
    Not familiar with C or its variations but looks fairly simple and should work. I'm quite intrigued as to what the problem is.

    Here's the embedded image for anyone who can help:

    [​IMG]
     
  3. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,144
    Not && :D
    Use || ;)
     
    • Thanks Thanks x 1
  4. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    omg such a simple stupid mistake. They are always the ones that get me.
     
  5. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,144
    Yes, it 's one of the most common mistakes when starting out :) No worries!
     
  6. hiderightnow

    hiderightnow Junior Member

    Joined:
    Jul 19, 2010
    Messages:
    104
    Likes Received:
    22
    Yeah, those are the ones who get you most of the time. As is & instead of && and viceversa :) especially when you know more than 1 programming language.