ScripterSteve 5 Share Posted October 16, 2018 if((getInventory().count("Warrior guild token") ) > this.config.getTokens()){ log("Stopping cus collected so many tokens"); stop(); } Above is my stopping code for the script and it was stopping when I wasn't expecting it to so ran some debugging on the counts and..| Very occasionally it returns the wrong number, see screenshot below but when it does causes my script to stop when it shouldn't. https://gyazo.com/d3089bd5c5bfb2ffa059f0c7f34851b6 https://gyazo.com/828dd5596b36815aaf0256c6b73410b4 Link to comment Share on other sites More sharing options...
ScripterSteve 5 Author Share Posted October 16, 2018 log("config Tokens" + Long.toString(this.config.getTokens())); log("Inventory Tokens" + Long.toString(getInventory().count("Warrior guild token"))); Was logging like this ^^ Link to comment Share on other sites More sharing options...
ScripterSteve 5 Author Share Posted October 16, 2018 Turns out mistake was i was using a long and not an int - thanks to Milasoft Link to comment Share on other sites More sharing options...
None 227 Share Posted October 17, 2018 4 hours ago, ScripterSteve said: Turns out mistake was i was using a long and not an int - thanks to Milasoft just btw, when logging you can just use log(""+long) you dont have to use Long.toString as long as the log begins with a string or an empty "" string Link to comment Share on other sites More sharing options...
ScripterSteve 5 Author Share Posted October 17, 2018 16 hours ago, None said: just btw, when logging you can just use log(""+long) you dont have to use Long.toString as long as the log begins with a string or an empty "" string Ah thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.