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.

HintArrows.getLoaded().get(0) gives me an NPE

Joined
Jun 21, 2014
Messages
350
Here is the code I'm trying to use to get the falcon specific to the local player, however it always gives me an NPE. I get a java.lang.arrayindexoutofboundsexception error when it tries to run.
Code:
if (HintArrows.getLoaded() != null) {

                    HintArrow caught = HintArrows.getLoaded().get(0);
                  
                    if (caught != null) {
                        Npc caughtBird = Npcs.getLoadedAt(caught.getPosition()).first();
                        clickThing(caughtBird, "Retrieve");
                  
                }
     }
The HintArrow definitely is not null and from what I understand, 0 should be the very first loaded HintArrow, so what is causing the error?

Edit: Mostly fixed, I'm just having problems with interacting with the falcon...
 
Last edited:
Joined
Jun 21, 2014
Messages
350
If it's an ArrayIndexOutOfBoundsException then the query results are empty.
Aidden pointed this out on skype and I just made sure to check that the list wasn't empty and I was able to mostly solve my problem. I had trouble with clicking the falcon though, the results weren't empty but the script would be stuck trying to interact but wouldn't. For now I've just made falcon retrieval only activate when the HintArrow doesn't return an empty list and then just relied on clicking the closest falcon, which should prevent clicking other people's falcons in a majority of cases.
 
Joined
Dec 10, 2014
Messages
3,377
Aidden pointed this out on skype and I just made sure to check that the list wasn't empty and I was able to mostly solve my problem. I had trouble with clicking the falcon though, the results weren't empty but the script would be stuck trying to interact but wouldn't. For now I've just made falcon retrieval only activate when the HintArrow doesn't return an empty list and then just relied on clicking the closest falcon, which should prevent clicking other people's falcons in a majority of cases.

What's the NPE you said you were getting btw?
 
Top