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
  • Help with ConcurrentModdificationException


    Chernobyl

    Recommended Posts

    Hello,

     

    I need your help guys. I want to get all trees in a specific area....

    List<GameObject> trees = getGameObjects().all(t -> woodArea.contains(t) && t != null && t.getName().equals("Tree"));
    

    Without the area condition it works, if not I get ConcurrentModdificationException :o Can you explain me what I did wrong please? 

     

    [ERROR]17:32:51: Exception has occurred while running! Please report error to developer if problem persists:
        java.util.ConcurrentModificationException
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1380)
        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.GameObjects.all(GameObjects.java:72)
        at org.dreambot.api.methods.interactive.Interactables.all(Interactables.java:59)
        at TreeChopper.getTarget(TreeChopper.java:100)
        at TreeChopper.onLoop(TreeChopper.java:555)
        at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:251)
        at java.lang.Thread.run(Thread.java:748)

     

    Tank you.

    Link to comment
    Share on other sites

    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.