Dorkinator 64 Share Posted June 17, 2017 [ERROR] Trying to access a null object! java.lang.NullPointerException at org.dreambot.api.wrappers.map.TileReference.getGridY(TileReference.java:104) at org.dreambot.api.methods.walking.path.impl.LocalPath.walkTileMM(LocalPath.java:93) at org.dreambot.api.methods.walking.path.impl.LocalPath.walk(LocalPath.java:77) at org.dreambot.api.methods.walking.path.impl.GlobalPath.walk(GlobalPath.java:38) at org.dreambot.api.methods.walking.impl.Walking.walk(Walking.java:123) at org.dreambot.api.methods.container.impl.bank.Bank.open(Bank.java:255) at org.dreambot.api.methods.container.impl.bank.Bank.openClosest(Bank.java:265) at walking.Walking.openBank(Walking.java:118) at jobs.BankNode.execute(BankNode.java:55) at main.Woodcutter.onLoop(Woodcutter.java:73) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:250) at java.lang.Thread.run(Unknown Source)Here's the stack trace. This happened at Draynor bank. Link to comment Share on other sites More sharing options...
Banker 175 Share Posted June 17, 2017 You can always just do: GameObject bankBooth = getGameObjects().closest(f -> f != null && f.getName().equalsIgnoreCase("Bank booth") && f.hasAction("Bank")); // then bankBooth.interact("Bank"); Link to comment Share on other sites More sharing options...
Eclipseop 194 Share Posted June 17, 2017 You can always just do: GameObject bankBooth = getGameObjects().closest(f -> f != null && f.getName().equalsIgnoreCase("Bank booth") && f.hasAction("Bank)); // then bankBooth.interact("Bank"); Hey u missed a " noob Link to comment Share on other sites More sharing options...
Dorkinator 64 Author Share Posted June 17, 2017 You can always just do: GameObject bankBooth = getGameObjects().closest(f -> f != null && f.getName().equalsIgnoreCase("Bank booth") && f.hasAction("Bank)); // then bankBooth.interact("Bank"); I'm not looking for a patch, I'm reporting a bug in the API. Link to comment Share on other sites More sharing options...
Banker 175 Share Posted June 17, 2017 Hey u missed a " noob Shhhhhhh Link to comment Share on other sites More sharing options...
rokaHakor 171 Share Posted June 17, 2017 I'm not looking for a patch, I'm reporting a bug in the API. I also find it annoying when other scripters try and give you workarounds when you are just trying to report a fucking bug. Link to comment Share on other sites More sharing options...
Dorkinator 64 Author Share Posted June 17, 2017 Im not sure from where you called the method but the first line of the stacktrace: at org.dreambot.api.wrappers.map.TileReference.getGridY(TileReference.java:104) is thrown when a map chunk, or whatever it is called is loaded/unloaded and you try to walk in that specific moment or check for Tiles, I also know that openClosest attempts to walk to the nearest Bank if it cant find any.I have been told that any getGridY can be ignored. I might be wrong but I've been told numerous times to ignore any getGrid errors. If it can be ignored it should be ignored in the API, not left in the API to throw random NPEs. Link to comment Share on other sites More sharing options...
Zawy 940 Share Posted June 17, 2017 Im not sure from where you called the method but the first line of the stacktrace: at org.dreambot.api.wrappers.map.TileReference.getGridY(TileReference.java:104) is thrown when a map chunk, or whatever it is called is loaded/unloaded and you try to walk in that specific moment or check for Tiles, I also know that openClosest attempts to walk to the nearest Bank if it cant find any. I have been told that any getGridY can be ignored. I might be wrong but I've been told numerous times to ignore any getGrid errors. Pretty much this. Link to comment Share on other sites More sharing options...
Nuclear Nezz 2056 Share Posted June 21, 2017 Like it has been said in the thread, the gridX/Y errors are issues with operating on tiles that have just been unloaded. The line of the error, for reference, is return yRef != null yRef.get() : -1; It shouldn't stop your script from operating. It does stop the current call from finishing, which as you can see in the stack trace is a walkTileMM method in walk. So while you think we should just push the error under the rug so you don't have to see it, it's still a reminder that a method did fail to finish, and for anybody who is watching the script run very, very closely it's an explanation as to why it did not click the minimap when they believed it should have. I can probably add a try/catch on it and print a different message before the stack trace, though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.