1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved Banks null in Canifis on RS3

Discussion in 'Developer Support' started by auxi, Jun 29, 2017.

Tags:
  1. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    Code (Text):
    1.  
    2. LocatableEntity bankLocations = Banks.newQuery().results().nearest();
    3. if (bankLocations != null) {
    4.     WebPath path = Traversal.getDefaultWeb().getPathBuilder().buildTo(bankLocations);
    5.     if (path != null) {
    6.         getLogger().info("Walking to: " + bankLocations);
    7.         path.step();
    8.     }
    9. } else {
    10.     getLogger().warn("Banks were null");
    11. }
    12.  
    Banks are returning null in Canifis on RS3. Any chance of fixing/adding the bank booth in Canifis?
     
    qverkk likes this.
  2. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
    auxi likes this.
  3. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    This works perfectly, thanks.

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

Share This Page

Loading...