May 23, 20178 yr I've noticed when running OSBot in debug mode I am getting a lot of null pointer errors because my bot is not logged in yet and the world has not loaded. Is there a best practise method for holding the script until the world is correctly loaded in? Cheers!
May 23, 20178 yr 9 minutes ago, Slut said: if(getClient().isLoggedIn()) This returns true during the "Loading please wait" message aswell, and items will still return null. Edited May 23, 20178 yr by Shudsy
May 23, 20178 yr 6 minutes ago, Shudsy said: This returns true during the "Loading please wait" message aswell, and items will still return null. I've never had an issue with this and I use it alongside ingame widgets that are only visible once things are loaded, but noted
May 23, 20178 yr Author Any checks for world loaded? Maybe checking if the character is visible...? lol
May 23, 20178 yr widgets -> singleFilter -> parent 548 ->hasAction Look North Sorry in a rush can't write the code, check if that widget is visbile
May 24, 20178 yr I like to use player indexes on first startup if (getClient().getMyPlayerIndex() > 0) { //or whatever //..... }
May 24, 20178 yr Author On 2017-5-23 at 10:06 AM, Shudsy said: This returns true during the "Loading please wait" message aswell, and items will still return null. public boolean isLoggedIn() Returns if you are currently logged in. Returns: True if logged in and not logged out or 'loading please wait...'. Is the api docs out of date? or is the description wrong?
May 24, 20178 yr 8 minutes ago, Tasemu said: public boolean isLoggedIn() Returns if you are currently logged in. Returns: True if logged in and not logged out or 'loading please wait...'. Is the api docs out of date? or is the description wrong? Not sure, but isLoggedIn() always bugs out for me when checking for items
Create an account or sign in to comment