Nexus123 Posted October 28, 2014 Share Posted October 28, 2014 Hello i made a bot and it's fully coded but it does nothing it just stands there... ERROR = [ERROR][bot #1][10/28 11:05:14 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [iNFO][bot #1][10/28 11:05:14 PM]: Started random solver : Welcome Screen [iNFO][bot #1][10/28 11:05:16 PM]: Random solver exited : Welcome Screen [ERROR][bot #1][10/28 11:05:16 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:17 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:18 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:19 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:20 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:21 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:05:22 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:29) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [iNFO][bot #1][10/28 11:05:22 PM]: Terminating script TEST... [iNFO][bot #1][10/28 11:05:22 PM]: Script TEST has exited! Link to comment Share on other sites More sharing options...
Harry Posted October 28, 2014 Share Posted October 28, 2014 Be more specific? 1 Link to comment Share on other sites More sharing options...
Nexus123 Posted October 28, 2014 Author Share Posted October 28, 2014 ok so when i launch the script it starts up and in console it says [ERROR][bot #1][10/28 11:12:27 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) need reply quick!! Link to comment Share on other sites More sharing options...
blakeblood9 Posted October 28, 2014 Share Posted October 28, 2014 ok so when i launch the script it starts up and in console it says [ERROR][bot #1][10/28 11:12:27 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) need reply quick!! so is it a script issue or client... Link to comment Share on other sites More sharing options...
Nexus123 Posted October 28, 2014 Author Share Posted October 28, 2014 that's what im not sure about Link to comment Share on other sites More sharing options...
Harry Posted October 28, 2014 Share Posted October 28, 2014 so is it a script issue or client... Seems like there is something up with your script. What is it trying to do? Link to comment Share on other sites More sharing options...
Nexus123 Posted October 28, 2014 Author Share Posted October 28, 2014 cut down trees (normal trees) Link to comment Share on other sites More sharing options...
blakeblood9 Posted October 28, 2014 Share Posted October 28, 2014 that's what im not sure about Does it happen when you open the client or start a script if script post the code on its thread and find a new script in the meantime. Link to comment Share on other sites More sharing options...
Nexus123 Posted October 28, 2014 Author Share Posted October 28, 2014 can i send it to someone through message ? package Woodcutter; import java.awt.Graphics; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Kn0oop", info = "Chops Trees.", logo = "", name = "Kn0PCutter", version = 1.0) public class Woodcutter extends Script { final String TREE_NAME = "Tree"; // Code Executed On Script Start public void onStart() { } // Code Executed On Script End. public void onExit() { } // Loop In Code. @SuppressWarnings("null") public int onLoop() { Inventory inven = null; if (inven.isFull()) { // Chop Entity tree = closestObjectForName(TREE_NAME); if (tree != null) { if (tree.isVisible()) { tree.interact("Chop Down"); } else { moveCameraTo(tree); } } else { // Bank } } return 50; } private Entity closestObjectForName(String TREE_NAME) { return null; } private void moveCameraTo(Entity tree) { } // Paint public void onPaint(Graphics g) { } } there is still alot more to code but it should work this might help [iNFO][bot #1][10/28 11:40:13 PM]: Random solver exited : Auto Login [ERROR][bot #1][10/28 11:40:16 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [iNFO][bot #1][10/28 11:40:16 PM]: Started random solver : Welcome Screen [iNFO][bot #1][10/28 11:40:18 PM]: Random solver exited : Welcome Screen [ERROR][bot #1][10/28 11:40:18 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:40:19 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:40:20 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [ERROR][bot #1][10/28 11:40:21 PM]: Error in script executor! java.lang.NullPointerException at Woodcutter.Woodcutter.onLoop(Woodcutter.java:30) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sg:186) at java.lang.Thread.run(Unknown Source) [iNFO][bot #1][10/28 11:40:21 PM]: Terminating script Kn0PCutter... [iNFO][bot #1][10/28 11:40:21 PM]: Script Kn0PCutter has exited! Link to comment Share on other sites More sharing options...
Swizzbeat Posted October 28, 2014 Share Posted October 28, 2014 Can non scripters please stop spamming up the SCRIPTING HELP section? Thanks. I suggest learning Java (most importantly what a null value is) as the error you're having is extremely simple. Not only that but you should learn how to read stack traces because it's telling you exactly where your error is and for what reason. Link to comment Share on other sites More sharing options...
Harry Posted October 28, 2014 Share Posted October 28, 2014 Why use your own script when you don't know how to script/use java. You should download one off of here for now. Link to comment Share on other sites More sharing options...
Xerion Posted October 28, 2014 Share Posted October 28, 2014 Inventory inven = null; if (inven.isFull()) { // Chop The bug is here. The script will throw a NPE because the "inven" instance is null. Just change it to: if (inventory.isFull()) { // Chop 1 Link to comment Share on other sites More sharing options...
Harry Posted October 28, 2014 Share Posted October 28, 2014 Inventory inven = null; if (inven.isFull()) { // Chop The bug is here. The script will throw a NPE because the "inven" instance is null. Just change it to: if (inventory.isFull()) { // Chop PROBLEM SOLVED, lock! :P Link to comment Share on other sites More sharing options...
liverare Posted October 28, 2014 Share Posted October 28, 2014 @SuppressWarnings("null") Lol I never knew such a thing existed. Lol what sadist fuck would actually use this!? 3 Link to comment Share on other sites More sharing options...