CLoud Posted July 31, 2018 Posted July 31, 2018 Hello! So whenever I try to type a string to the keyboard I get this error. getKeyboard().typeString("250", true); [ERROR][Bot #1][07/31 02:25:53 PM]: Error in script executor! java.lang.NullPointerException at core.Main.onLoop(Main.java:386) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(kl:223) at java.lang.Thread.run(Unknown Source) I've tried keyboard.typeString() and getKeyboard().typeString() but nothing seems to be working. Anyone got any ideas?
Explv Posted July 31, 2018 Posted July 31, 2018 It means you have a NullPointerException on line 386. Nothing to do with typeString()
CLoud Posted July 31, 2018 Author Posted July 31, 2018 3 minutes ago, Explv said: It means you have a NullPointerException on line 386. Nothing to do with typeString() How do I avoid it then? With just a try/catch?
Khaleesi Posted July 31, 2018 Posted July 31, 2018 (edited) 2 hours ago, Zoruda said: How do I avoid it then? With just a try/catch? There is a nullpointer exception on something else ... so you must null check? Show more of your code? Core.Main line 386? Edited July 31, 2018 by Khaleesi
CLoud Posted August 1, 2018 Author Posted August 1, 2018 4 hours ago, Khaleesi said: There is a nullpointer exception on something else ... so you must null check? Show more of your code? Core.Main line 386? Managed to figure it out. Actually just moved to a different way. This was part of my GE script and sellItem wasnt working then I realized Im getting the same error and realized I had a capital on an Item name. Thanks for you guy's help!