Mysql & variables

Discussion in 'Plugin Development' started by DevManABCD, Apr 24, 2014.

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

    DevManABCD

    System.out.println(test2 + " Zrobilem!");

    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if(label.equalsIgnoreCase("test")){
    Player p = (Player) sender;
    p.sendMessage(test2 + " Zrobilem!");
    }
    return false;
    }


    }
    [/syntax]


    But when i want to add test2 to message i see this error: test2 cannot be resolved to a variable
     
  2. DevManABCD You need to learn about how Java methods return values. Edit: And probably more about the mysql methods you're using
     
  3. Offline

    DevManABCD

    AdamQpzm

    But, can you please help me with this?...
     
  4. DevManABCD I'm sorry, but I'm good at helping, not good at teaching. If you don't really understand how Java works, it's not possible for me to help you.
     
  5. Offline

    DevManABCD

    Thanks for, very big help.
     
  6. Offline

    Slikey

    DevManABCD Please remove the connection data, like IP Adress and passwords from you post.. Just a quick tip..
     
    Mathias Eklund likes this.
  7. Offline

    Mathias Eklund

    Yeah, I'd remove the SQL information pretty quick. If some trolls get a hold of this... Things could turn sour.
     
  8. Offline

    Dread9Nought


    I took the liberty, of course with good intentions to test his info, hes fortunately changed his password.
     
  9. Offline

    Mathias Eklund

Thread Status:
Not open for further replies.

Share This Page