Resolved Failing to find gameobject

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

  1. 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.

    --- 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. Doesn't really make sense but I'll look into it some.
  4. Code (Text):
    2. final Tree tree = activity.treeProperty().get().getLeft();
    3. final TreeArea area = activity.areaProperty().get();
    4. new WoodcutterContext(tree.toString(), area.getArea(tree));
    6. public WoodcutterContext(String treeName, Area treeArea) {
    7.     setQueryBuilder(treeName, treeArea);
    8. }
    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. }
  5. @Cloud the issue is that surroundingsReachable() calls (and caches) Players.getLocal() which isn't available when not logged in.
  6. 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. 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. Fixed for the next release.
  9. Fuck yes, thanks bae <3

Share This Page