Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error when interacting with item in inventory

Featured Replies

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 by Loki874

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 :)

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.

  • 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")
}

 

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.

Item tuna = inventory.getItem("Tuna");

if (tuna != null) {
	tuna.interact("Eat");
}

 

  • 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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.