Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved isValid() throwing ArrayIndexOutOfBounds Exception

Joined
Dec 10, 2014
Messages
3,255
Stacktrace:
Code:
java.lang.RuntimeException: 
java.lang.ArrayIndexOutOfBoundsException 
    at com.runemate.game.api.script.Execution.delayUntil(xhb:96)
 at com.runemate.game.api.script.Execution.delayUntil(xhb:239)
 at com.runemate.game.api.script.Execution.delayUntil(xhb:30)
 at com.slashnhax.scripts.haxagility.courses.AgilityCourse.execute(AgilityCourse.java:66)
 at com.slashnhax.scripts.haxagility.HaxAgility.poll(HaxAgility.java:35)
 at com.slashnhax.scripts.HaxScript.onLoop(HaxScript.java:46)
 at com.runemate.game.api.script.framework.LoopingScript.run(yhb:89)
 at com.runemate.game.api.script.framework.AbstractScript.start(plb:197)
 at a.sJ.run(clb:102)Caused by: java.lang.ArrayIndexOutOfBoundsException
 at java.lang.reflect.Array.get(Native Method) 
    at a.Rl.byte(oeb:44) 
    at com.runemate.game.api.hybrid.region.GameObjects.getLoadedAt(wpb:65)
 at com.runemate.game.api.hybrid.region.GameObjects.getLoadedAt(wpb:247)
 at a.TM.isValid(rrb:185)
 at a.Hn.isVisible(pqb:240)
 at a.vl.byte(sqb:126)
 at a.vl.byte(sqb:28)
 at a.vl.byte(sqb:152)
 at a.vl.move(sqb:75)
 at com.runemate.game.api.hybrid.input.Mouse.move(ep:234)
 at com.runemate.game.api.hybrid.input.Mouse.move(ep:256)
 at a.Hn.hover(pqb:19)
 at com.slashnhax.scripts.haxagility.courses.AgilityCourse.lambda$execute$3(AgilityCourse.java:71)
 at com.slashnhax.scripts.haxagility.courses.AgilityCourse$$Lambda$439/1398505156.call(Unknown Source)
 at com.runemate.game.api.script.Execution.delayUntil(xhb:163) 
    ... 8 more

Lines 66-75 of my script code:

Code:
Execution.delayUntil(() -> {
    if (nextObstacle != null) {
        if (!nextObstacle.isVisible()) {
            Camera.turnTo(nextObstacle);
        } else {
            nextObstacle.hover();
        }
    }
    return next.isFinished();
}, 200, next.getCompletionTime());
 
Top