Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • NullPointers on calling getGameObjects().all()


    Recommended Posts

    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) {

    And I get this error in the console

    • [ERROR]16:59:20: java.lang.NullPointerException at org.dreambot.core. 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?

    Link to comment
    Share on other sites

    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.


    Link to comment
    Share on other sites

    Thanks for the advice but sadly it didn't work either :(


    • [ERROR]17:40:14: java.lang.NullPointerException at org.dreambot.core. 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)   
    Link to comment
    Share on other sites


    This topic is now archived and is closed to further replies.

    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.