gumibearscuz 0 Posted July 5, 2017 I have no idea if this is a problem on my end or not. Running ubuntu 16.04 x64 with jre 1.8.0_131 x86. When opening up the debug menu all of the gameobjects, npcs, and ground items don't work. Clicking refresh does nothing so I cannot check gameobject ids or anything useful at all. I went on to write a script that didn't need IDs but now it just errors out when attempting to loop over the objects. for (GameObject obj : getGameObjects().all()) { if (obj != null) { log(obj.toString()); } } And I get this error in the console [ERROR]16:59:20: java.lang.NullPointerException at org.dreambot.core.3.1.0.3.0(3.java:92) at org.dreambot.api.wrappers.interactive.GameObject.getRealID(GameObject.java:194) at org.dreambot.api.wrappers.interactive.GameObject.getComposite(GameObject.java:205) at org.dreambot.api.wrappers.interactive.GameObject.getName(GameObject.java:251) at org.dreambot.api.wrappers.interactive.GameObject.toString(GameObject.java:353) at Main.onStart(Main.java:30) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:195) at java.lang.Thread.run(Thread.java:748) Is this something I messed up or is something broken?
Xephy 237 Posted July 5, 2017 Use a filter to filter out the null gameobjects as such before looping like so: GameObject objects = getGameObjects().all(g -> g != null); // this will only put non-null objects in your list. for (GameObject o : objects) { log (o.getName()); // pretty sure getName() is supported by gameObjects. Just calling toString() will result in a funky ID. }
gumibearscuz 0 Author Posted July 5, 2017 Thanks for the advice but sadly it didn't work either [ERROR]17:40:14: java.lang.NullPointerException at org.dreambot.core.3.1.0.3.0(3.java:92) at org.dreambot.api.wrappers.interactive.GameObject.getModel(GameObject.java:278) at org.dreambot.api.wrappers.interactive.GameObject.exists(GameObject.java:341) at org.dreambot.api.methods.interactive.Interactables.lambda$all$0(Interactables.java:61) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.dreambot.api.methods.interactive.Interactables.all(Interactables.java:61) at Main.onStart(Main.java:28) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:195) at java.lang.Thread.run(Thread.java:748)
Polymorphism 48 Posted July 6, 2017 run with 64bit java and make sure you're logged in (didn't state if you were or not)
gumibearscuz 0 Author Posted July 6, 2017 Ah sorry, I was logged in when trying and I am running x64, my bad for screwing that up
Recommended Posts
Archived
This topic is now archived and is closed to further replies.