Scorpius 144 Posted July 3, 2017 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)
Cardozz 46 Posted July 3, 2017 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.
Scorpius 144 Author Posted July 3, 2017 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.