Jump to content

Null pointer with .getZ()


Isolate

Recommended Posts

You should be using an ArrayList here (while programming to the interface as well):

List<ScriptTask> tasks = new ArrayList<ScriptTask>();

LinkedList orders elements sequentially, so their good when you need to add/remove things. ArrayList on the other hand has faster read access. It's not a big deal here but it's just something I noticed :)

 

As for your actual question, most likely client is returning null because you don't have an instance of it. Actually, on second look that is 100% the issue because you're extending Script in your class which is giving you another instance of script besides the one that was actually initialized. You need to pass the Script instance from your main class to the separate classes you use.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...