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

Resolved Failing to find gameobject

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

  1. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    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

    Cloud Engineer

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

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    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,937
    Likes Received:
    1,266
    @Cloud the issue is that surroundingsReachable() calls (and caches) Players.getLocal() which isn't available when not logged in.
     
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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,937
    Likes Received:
    1,266
    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

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Fixed for the next release.
     
  9. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    Fuck yes, thanks bae <3
     

Share This Page

Loading...