Jump to content

getStore.getAmount


Dab in a Lab

Recommended Posts

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)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...