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.

getStore.getAmount

Featured Replies

Came across this thread in my search and I get the same error. Was this never fixed?

I get an error when I define this 

int itemAmount = getStore().getAmount("Item");

 

This is the errors I get for itemAmount (ln 99 is itemAmount above)

Spoiler

[ERROR][Bot #1][07/15 12:19:01 PM]: Error in script executor!
java.lang.ArrayIndexOutOfBoundsException: 2
    at org.osbot.rs07.api.Store.iiIiiiiiIiiI(dk)
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
    at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
    at org.osbot.rs07.api.util.CachedWidget.cache(do:253)
    at org.osbot.rs07.api.Store.iiIiiiiiIiiI(dk:253)
    at org.osbot.rs07.api.Store.getItems(dk:71)
    at org.osbot.rs07.api.Store.getAmount(dk:65)
    at Main.onLoop(Main.java:99)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(kl:223)
    at java.lang.Thread.run(Unknown Source)

 

[ERROR][Bot #1][07/15 12:19:09 PM]: Error in script executor!
java.lang.NullPointerException
    at org.osbot.rs07.api.Store.getAmount(dk:59)
    at Main.onLoop(Main.java:99)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(kl:223)
    at java.lang.Thread.run(Unknown Source)

 

  • Author

Fixed it using RS2Widget = widgetName.getItemAmount().

Does getStore().getAmount(); just broken or was I doing something wrong?

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.