January 17, 201610 yr So when i wrote my script but when it's up and running after some time it starts lagging really bad and gives this error in the logger: [ERROR][Bot #1][01/17 07:46:41 PM]: Error in script executor! java.lang.NullPointerException at mWyverns.getState(mWyverns.java:134) at mWyverns.onLoop(mWyverns.java:142) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(qf:131) at java.lang.Thread.run(Unknown Source) at line 134 i have this: GroundItem bone = getGroundItems().closestThatContains("potion","Clue", "Adamant", "Granite", "Uncut", "key", "logs", "Runite", "battlestaff", "Rune", "Dragon", "Snapdragon", "Ranarr", "bar", "Draconic","bones"); if (bone.isOnScreen()) return State.LOOT;
January 17, 201610 yr If I had to guess, you're not checking if bone is null (i.e. an item exists with one of those names.) if (bone != null && bone.isOnScreen())
January 17, 201610 yr Author If I had to guess, you're not checking if bone is null (i.e. an item exists with one of those names.) if (bone != null && bone.isOnScreen()) you also need to null check bone != null thanks guys, seems to work
Create an account or sign in to comment