Cannot Target Cause Of Null Pointer Exception

Discussion in 'Plugin Development' started by xXxAdmanxXx, Jul 23, 2011.

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

    xXxAdmanxXx

    Hello everyone,

    Thanks for taking the time to look at this thread. My friend and I are working our first plugin, which I cannot tell you much about it, as we are only 2/3rds of the way in, and I cannot copy the code because it takes up almost 950 lines of code.

    Please read all of the following before giving a solution:
    We have been getting the following error since we added some features last night. We have debugged tons of errors but we cannot decipher this message, and the weird thing is it is giving the error after it is finished with the part of the code in question is finished completing. The problem with this error though, is that it crashes the server immediately! If you can pinpoint a general cause of this error, id be very grateful!
    The error is as follows:

    Thank you so much for your time!

    ~Ad-man
     
  2. It seems like you are doing some REALLY weird stuff with signs.
    But without any code and not even details on when this happens and what it should do, no one can do anything ...
     
  3. Offline

    loganwm

    In addition, 950 lines of code for a first-time plugin developer [I'd also wager you and your friend are new to programming] is typically indicative of an inelegant solution.
     
  4. Offline

    xXxAdmanxXx

    Bone: Well yes, we are doing some really weird stuff with signs, I guess I can post the code if it is impossible to specify a general idea of whats going on.

    Logan: We are not new to Java, and we have a history of programming many different applications in multiple languages, despite the fact were 14. So 950 lines of code isnt the longest weve had. And it needs to be that long, not like we have fail code, just a LOT of stuff in one plugin is all
     
  5. Offline

    nisovin

    I'd guess you've set one of the lines in a sign to null.
     
  6. Offline

    xXxAdmanxXx

    Ill double-check but I'm fairly sure all the variables inputted to the sign isn't null

    Hmm they are not null but the last lines of code other than a player.sendMessage before the fatal error occurs is:
     
  7. Offline

    nisovin

  8. Offline

    xXxAdmanxXx

    Leme check some more of the code real quick...

    AHA! Those 2 commands returned null! Its fixed! Thanks bro, lots of help!
    Ill put ya on the Thanks list!
     
Thread Status:
Not open for further replies.

Share This Page