Solved args probelm

Discussion in 'Plugin Development' started by Bobfan, Nov 23, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Bobfan

    I am having trouble with args.
    Code:
    if((command.getName().equalsIgnoreCase("RaceJoin"))) &&
      (args.length > 0) {
    //...
     
    if(args[0] == "Human") {
    //...
    It won't go past there. I put in some p.sendMessages to see where it stops, and it gets to right there. Am I using it right?
     
  2. Offline

    ZeusAllMighty11

    If the args length is greater than 0, and the first arg is human...

    The way you have this spaced out I'm not sure how the rest looks. Post the whole method?



    Don't compare strings with == by the way, use .equals().
     
  3. Offline

    fireblast709

    This probably is the reason
     
  4. Offline

    Bobfan

    It works now, ty
     
Thread Status:
Not open for further replies.

Share This Page