Dab in a Lab Posted July 15, 2018 Share Posted July 15, 2018 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) Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted July 15, 2018 Author Share Posted July 15, 2018 Fixed it using RS2Widget = widgetName.getItemAmount(). Does getStore().getAmount(); just broken or was I doing something wrong? Quote Link to comment Share on other sites More sharing options...