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
  • NullPointerException


    Scorpius

    Recommended Posts

    Posted

    Sometimes my script throws a NullPointerException when using getWalking().toggleRun()

    [ERROR]11:29:20: Exception has occurred while running! Please report error to developer if problem persists:
        java.lang.NullPointerException
        at org.dreambot.api.methods.walking.impl.Walking.toggleRun(Walking.java:220)
        at MYSCRIPT.Tasks.DrinkStaminaPotion.accept(DrinkStaminaPotion.java:20)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at org.dreambot.api.script.impl.TaskScript.onLoop(TaskScript.java:73)
        at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:250)
        at java.lang.Thread.run(Unknown Source)
    

    Nevermind, this occurs if the game is loading (due to a world hop)

    Posted

    Sometimes my script throws a NullPointerException when using getWalking().toggleRun()

    [ERROR]11:29:20: Exception has occurred while running! Please report error to developer if problem persists:
        java.lang.NullPointerException
        at org.dreambot.api.methods.walking.impl.Walking.toggleRun(Walking.java:220)
        at MYSCRIPT.Tasks.DrinkStaminaPotion.accept(DrinkStaminaPotion.java:20)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at org.dreambot.api.script.impl.TaskScript.onLoop(TaskScript.java:73)
        at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:250)
        at java.lang.Thread.run(Unknown Source)
    

    Nevermind, this occurs if the game is loading (due to a world hop)

    It nulls out because it can't  find the "run" widget. Maybe it's a good idea to place your hopping algorithm into a separate method handler so your script won't loop while it's hopping/loading.

    Posted

    It nulls out because it can't  find the "run" widget. Maybe it's a good idea to place your hopping algorithm into a separate method handler so your script won't loop while it's hopping/loading.

    I got around it by null checking

    Archived

    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.