Hey, today I started making my first script and got a bug called NullPointerException when I try to use store.interact or store.buy from OSBot API. Here's a part of my code:
if(store.isOpen()){
status = "Buying";
sleep(random(300,700));
store.interact(8, "Buy 5");
//...
}
What I would like to do in-game:
and here is the error:
[ERROR][Bot #1][09/10 10:31:22 PM]: Error in script executor!
java.lang.NullPointerException
at org.osbot.rs07.api.Store.interact(xi:364)
at main.onLoop(main.java:82)
at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ni:26)
at java.lang.Thread.run(Unknown Source)
So how could I fix that?