Resolved Failing to find gameobject

Discussion in 'Developer Support' started by Aidden, Feb 15, 2016.

  1. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,464
    Likes Received:
    712
    RS3. Unable to find the tree's if i start the bot logged out. When i start it logged in it has no issues.
    If i start logged in and then log out, it has no issues either.

    @Cloud
    --- Double Post Merged, Feb 15, 2016, Original Post Date: Feb 15, 2016 ---
    More specifically, if you store the query builder while logged out or in the lobby it never finds a tree. If you store the query builder after logging in, it works fine. @Cloud

     
  2. Best Answer:
    Post #7 by Cloud, Mar 6, 2016
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,518
    Likes Received:
    890
    Doesn't really make sense but I'll look into it some.
     
  4. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,464
    Likes Received:
    712
    Code (Text):
    1.  
    2. final Tree tree = activity.treeProperty().get().getLeft();
    3. final TreeArea area = activity.areaProperty().get();
    4. new WoodcutterContext(tree.toString(), area.getArea(tree));
    5.  
    6. public WoodcutterContext(String treeName, Area treeArea) {
    7.     setQueryBuilder(treeName, treeArea);
    8. }
    9.  
    10. public void setQueryBuilder(String treeName, Area treeArea) {
    11.     this.treeArea = treeArea;
    12.     builder = GameObjects.newQuery().names(treeName).actions("Chop down", "Chop").surroundingsReachable().within(treeArea);
    13. }
    14.  
     
  5. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,549
    Likes Received:
    1,068
    @Cloud the issue is that surroundingsReachable() calls (and caches) Players.getLocal() which isn't available when not logged in.
     
  6. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,518
    Likes Received:
    890
    It doesn't cache Players.getLocal() since it returns a null value, and since it returns a null value it can't determine what's reachable.
     
  7. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,549
    Likes Received:
    1,068
    Caching a null value is still caching. :p Regardless we should be able to fix it with a callable.


    Sent from my iPhone using Tapatalk
     
  8. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,518
    Likes Received:
    890
    Fixed for the next release.
     
  9. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,464
    Likes Received:
    712
    Fuck yes, thanks bae <3
     

Share This Page

Loading...