brbxd 2 Share Posted December 24, 2018 Hey guys, after a couple months of break from scripting I came back to a problem in my fishing guild script. log("About to fuck up"); NPC fishy = getNpcs().closest(i -> i != null && i.hasAction("Net") && fishArea.contains(i)); log("Hello"); if (fishy != null) { fishy.interact("Harpoon"); sleepUntil(() -> getLocalPlayer().isAnimating(), 6000); } I end up getting this in my console. [INFO]13:13:27: Script set to running! [INFO]13:13:27: About to fuck up [ERROR]13:13:27: Exception has occurred while running! Please report error to developer if problem persists: java.lang.NullPointerException [INFO]13:13:28: About to fuck up [ERROR]13:13:28: Exception has occurred while running! Please report error to developer if problem persists: java.lang.NullPointerException Did fishing spots get changed to game objects or is there something else that I'm not up to date with? Thanks guys/gals! Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted December 25, 2018 4 hours ago, brbxd said: Hey guys, after a couple months of break from scripting I came back to a problem in my fishing guild script. log("About to fuck up"); NPC fishy = getNpcs().closest(i -> i != null && i.hasAction("Net") && fishArea.contains(i)); log("Hello"); if (fishy != null) { fishy.interact("Harpoon"); sleepUntil(() -> getLocalPlayer().isAnimating(), 6000); } I end up getting this in my console. [INFO]13:13:27: Script set to running! [INFO]13:13:27: About to fuck up [ERROR]13:13:27: Exception has occurred while running! Please report error to developer if problem persists: java.lang.NullPointerException [INFO]13:13:28: About to fuck up [ERROR]13:13:28: Exception has occurred while running! Please report error to developer if problem persists: java.lang.NullPointerException Did fishing spots get changed to game objects or is there something else that I'm not up to date with? Thanks guys/gals! Has action "Net" fishy.interact("Harpoon") pretty sure that's why it's messing up lol. Edit: Actually it has an error before it even gets to that part as it never logs "Hello", is there any chance that the fishArea is null or something along those lines. Try removing the fish area condition or just keep removing conditions until it no longer shows the null pointer error. Link to comment Share on other sites More sharing options...
Hashtag 8671 Share Posted December 25, 2018 fishArea is null. Link to comment Share on other sites More sharing options...
brbxd 2 Author Share Posted December 26, 2018 20 hours ago, Koschei said: Has action "Net" fishy.interact("Harpoon") pretty sure that's why it's messing up lol. Edit: Actually it has an error before it even gets to that part as it never logs "Hello", is there any chance that the fishArea is null or something along those lines. Try removing the fish area condition or just keep removing conditions until it no longer shows the null pointer error. 11 hours ago, Hashtag said: fishArea is null. I deleted all conditions and literally only searched for the closest fishing spot and for some reason I am still getting a null pointer. Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted December 26, 2018 2 hours ago, brbxd said: I deleted all conditions and literally only searched for the closest fishing spot and for some reason I am still getting a null pointer. Try turning on fresh start in the client settings. Link to comment Share on other sites More sharing options...
brbxd 2 Author Share Posted December 26, 2018 14 hours ago, Koschei said: Try turning on fresh start in the client settings. Fixed, thank you. If you don't mind me asking, what exactly does fresh start do, and why did it fix this problem? Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted December 27, 2018 6 hours ago, brbxd said: Fixed, thank you. If you don't mind me asking, what exactly does fresh start do, and why did it fix this problem? It makes the client load with a new cache every time, just means there was an issue with the cache. Link to comment Share on other sites More sharing options...
brbxd 2 Author Share Posted December 28, 2018 On 12/26/2018 at 7:08 PM, Koschei said: It makes the client load with a new cache every time, just means there was an issue with the cache. That's what I had in mind, thank you for clearing that up for me! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.