Welcome!

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

Sign up now!
RuneMate will permanently shut down on August 7, 2026
due to events outside our control. You can continue using RuneMate until this date after which it will no longer be available. Thank you to everyone that contributed to RuneMate's success and to the community for the opportunity to serve you all these years.

  • Learn about RuneMate Vault and how its zero knowledge local encryption already protects your sensitive information.
  • Edit or delete your RuneMate account from your Account Settings.
  • All account upgrade subscriptions have been cancelled. No action required.

Resolved ArrayIndexOutOfBounds

Joined
Dec 18, 2014
Messages
398
@Cloud possibly a client bug.
(09:18:19) java.lang.ArrayIndexOutOfBoundsException
(09:18:19) at java.lang.reflect.Array.get(Native Method)
(09:18:19) at a.al.byte(ywb:131)
(09:18:19) at a.Gl.getComponent(whb:64)
(09:18:19) at com.runemate.game.api.hybrid.local.hud.interfaces.Interfaces.getAt(dwb:52)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.interfaceNext(RaysNatRunner.java:364)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.repairNPC(RaysNatRunner.java:343)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.repairNPC(RaysNatRunner.java:328)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.repairNPC(RaysNatRunner.java:328)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.repairNPC(RaysNatRunner.java:313)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.checkPouches(RaysNatRunner.java:197)
(09:18:19) at com.raymondbl.runemate.natRunner.RaysNatRunner.onLoop(RaysNatRunner.java:124)
(09:18:19) at com.runemate.game.api.script.framework.LoopingScript.run(yhb:89)
(09:18:19) at com.runemate.game.api.script.framework.AbstractScript.start(plb:197)
(09:18:19) at a.sJ.run(clb:102)

Lines 362 - 373 of my code:
Code:
    public boolean interfaceNext(int i, int k, int m)
    {
        if(Interfaces.getAt(i, k, m) != null)         //error occuring here
        {
            if(Interfaces.getAt(i, k, m) != null)
            {
                return Interfaces.getAt(i, k, m).click();
            }
            else return true;
        }
        else return false;
    }

Line 343, which calls the method above:
Code:
interfaceNext(88, 6, 14);

I double-checked. The Development Toolkit indeed lists the Dark Mage InterfaceComponent from the lunar spell Contact NPC as [88, 6, 14].

edit: I also tried [88, 5, 14], which came out with the same error.
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
Well I've adjusted it to make sure the exception doesn't occur again, but if your passing a valid index within the correct range it shouldn't have happened.
 
Joined
Dec 18, 2014
Messages
398
Well I've adjusted it to make sure the exception doesn't occur again, but if your passing a valid index within the correct range it shouldn't have happened.
Weird. I take it that means that the adjustment, while preventing an exception, will not allow the script to obtain the interfaceComponent I'm looking for because my index isn't valid. We'll see when the update rolls out.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Weird. I take it that means that the adjustment, while preventing an exception, will not allow the script to obtain the interfaceComponent I'm looking for because my index isn't valid. We'll see when the update rolls out.
That is correct. As another point, there is absolutely no reason that you should ever be looking up a specific interface component by index. Use dynamic queries instead.
 
Joined
Dec 18, 2014
Messages
398
That is correct. As another point, there is absolutely no reason that you should ever be looking up a specific interface component by index. Use dynamic queries instead.
Thanks. I originally started used specific indices because the yellow button in character dialogue doesn't have text. I now realize the Texture ID stays the same for EOC and Legacy Mode and thus, can be used in a dynamic query's filter.
 
Top