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 Banks null in Canifis on RS3

Joined
May 24, 2016
Messages
1,113
Code:
LocatableEntity bankLocations = Banks.newQuery().results().nearest();
if (bankLocations != null) {
    WebPath path = Traversal.getDefaultWeb().getPathBuilder().buildTo(bankLocations);
    if (path != null) {
        getLogger().info("Walking to: " + bankLocations);
        path.step();
    }
} else {
    getLogger().warn("Banks were null");
}

Banks are returning null in Canifis on RS3. Any chance of fixing/adding the bank booth in Canifis?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Uhm, Banks.newQuery().results() will return all banks that are loaded in the local region, now if you were to do Traversal.getDefaultWeb().getPathBuilder().buildTo(Landmark.BANK), you may get different results.
 
Joined
May 24, 2016
Messages
1,113
Uhm, Banks.newQuery().results() will return all banks that are loaded in the local region, now if you were to do Traversal.getDefaultWeb().getPathBuilder().buildTo(Landmark.BANK), you may get different results.

This works perfectly, thanks.

That feeling when you think you know the api decently well but then this happens...
 
Top