ScripterSteve 5 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
ScripterSteve 5 Author 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 ^^
ScripterSteve 5 Author Posted October 16, 2018 Turns out mistake was i was using a long and not an int - thanks to Milasoft
None 227 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
ScripterSteve 5 Author 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.