Thread: Commands

Results 1 to 3 of 3
  1. #1
    R3Dx666†'s Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Steam: MrTricklez
    Posts
    1,723
    Reputation
    141
    Thanks
    2,913
    My Mood
    Devilish

    Unhappy Commands

    hey people i try to make another command but it don't work i have stringed it btw

    Code:
    //HELP
    if(line == "/help")
    {
    cout<<"command list\n /info - information of program\n /help - list of commands"<<endl;
    main();
    }
    else
    {
    cout<<"Failed To Get Command"<<endl;
    main();
    }
    
    //info
    if(line2 == "/info")<--- This Don't Work
    {
    cout<<"test line1"<<endl;
    main();
    }
    else
    {
    cout<<"test line2"<<endl;
    main();
    }
    thanks

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    edit: wasn't paying attention. That line of code never gets called, and here's why:
    Code:
    if(line == "/help")
    {
    cout<<"command list\n /info - information of program\n /help - list of commands"<<endl;
    main(); // GO TO MAIN
    }
    else
    {
    cout<<"Failed To Get Command"<<endl;
    main(); // GO TO MAIN
    }
    ...
    main()
    ^^No Matter what, this code only has 2 options..or 1 really

    The code never RUNS the 2nd if statement, because of the first one
    If the input isn't "/help", the code just calls main...
    where it checks for "/help" ELSE call main...
    where it checks for "/help" ELSE call main..
    forever and ever.
    Last edited by abuckau907; 01-19-2013 at 12:55 PM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3

Similar Threads

  1. Run Commands!
    By AN1MAL in forum Spammers Corner
    Replies: 12
    Last Post: 01-01-2007, 01:51 PM
  2. supreme commander and command&conquer hacking
    By TheDisruptor in forum General Game Hacking
    Replies: 3
    Last Post: 11-26-2006, 10:50 PM
  3. Command & Conquer Generals
    By heero_yuy in forum General Game Hacking
    Replies: 2
    Last Post: 06-21-2006, 03:12 AM
  4. Warrock Command List
    By Dave84311 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-26-2006, 11:03 PM
  5. Demon of some commands
    By HolyFate in forum Gunz Hacks
    Replies: 12
    Last Post: 02-21-2006, 01:43 PM