August 16, 20196 yr Hi, I have the following piece of code: inventory.getItem("Tuna").interact("Eat") and sometimes the bot hangs up for a few seconds (looks like 7 seconds) and displays the following error into the logger: [ERROR][Bot #1][08/16 08:43:25 AM]: Inventory widget is null, trying to guess position. This is causing the bot to sometimes die as he does not eat on time. Any suggestions? EDIT: I could confirm there are still Tunas left in the inventory Edited August 16, 20196 yr by Loki874
August 16, 20196 yr 3 hours ago, Loki874 said: Hi, I have the following piece of code: inventory.getItem("Tuna").interact("Eat") and sometimes the bot hangs up for a few seconds (looks like 7 seconds) and displays the following error into the logger: [ERROR][Bot #1][08/16 08:43:25 AM]: Inventory widget is null, trying to guess position. This is causing the bot to sometimes die as he does not eat on time. Any suggestions? EDIT: I could confirm there are still Tunas left in the inventory Open the inventory before trying to eat
August 16, 20196 yr 4 hours ago, Loki874 said: [ERROR][Bot #1][08/16 08:43:25 AM]: Inventory widget is null, trying to guess position. This error sometimes occurs in re-sizable mode - set your bot to fixed screen mode.
August 17, 20196 yr Author FIXED Looks like it was happening occasionally when the inventory tab wasn't available (like when the bank interface is open) if(tabs.getTabWidget(Tab.INVENTORY) != null && !Tab.INVENTORY.isDisabled(bot)) { inventory.getItem("Tuna").interact("Eat") }
August 17, 20196 yr 17 minutes ago, Loki874 said: FIXED Looks like it was happening occasionally when the inventory tab wasn't available (like when the bank interface is open) if(tabs.getTabWidget(Tab.INVENTORY) != null && !Tab.INVENTORY.isDisabled(bot)) { inventory.getItem("Tuna").interact("Eat") } Download the dev build 2.5.55 It can now tell where items are in inventory without it being open according to Patrick's change log.
August 17, 20196 yr Item tuna = inventory.getItem("Tuna"); if (tuna != null) { tuna.interact("Eat"); }
August 17, 20196 yr Author 55 minutes ago, liverare said: Item tuna = inventory.getItem("Tuna"); if (tuna != null) { tuna.interact("Eat"); } 6 hours ago, Gunman said: Download the dev build 2.5.55 It can now tell where items are in inventory without it being open according to Patrick's change log. Will try it thx
Create an account or sign in to comment