Archived

Discussion in 'BungeeCord Plugin Development' started by HydroTekZ, Jun 24, 2015.

  1. Archived
     
    #1 HydroTekZ, Jun 24, 2015
    Last edited: Sep 14, 2015
  2. Don't name variables using upper case, I have no idea if plugin.FellesPlugin is some variable, or package and class. This is why we use standard names, to know what is what without having whole code.

    FellesPlugin or ConnectorMySQL or maybe plugin is null, instead of asking you can use debug mode of your IDE, or if you don't know how to use it, and don't want use google to learn it:
    System.out.println("Pl: "+plugin);
    System.out.println("FP: "+plugin.FellesPlugin);
    System.out.println("CM: "+plugin.ConnectorMySQL);
    System.out.println("UM: "+plugin.FellesPlugin.UtilMySQL);

    And you will see what is null, if "plugin" is null, first println will print null, and next one will throw error.
     
    • Like Like x 1
  3. Hard for us to help, could be anything that is null. Maybe it is your connection to the database or the output as it is called in your code.
     
  4. I would say
    Code (Text):
    plugin
    is null or
    Code (Text):
    ConnectorMySQL
    in
    Code (Text):
    plugin
    Otherwise the Exception would be thrown in
    Code (Text):
    getInt(String output, String command, Connection connection)
    and not in line 42

    It could also be that one of the variables
    Code (Text):
    plugin.FellesPlugin.UtilMySQL
    is null.
     
  5. Your Answere is not entirely true. He can use any notation of naming he want. Right now he is using the notation UpperCamelCase.

    However in Java it had been enforced that the camelCase notation is used.
     
  6. He didn't say he can't, more he shouldn't. He's answer is true
     
  7. I never said that his answere were false :)