sudoinit6 Posted April 28, 2019 Share Posted April 28, 2019 So following this guide I am writing a script: Mostly it works flawlessly, but some of my classes just wont work. For example I have a class where the condition check is:: @Override public boolean canProcess() { return VarWest.contains(api.myPlayer()) && !api.bank.isOpen(); } If this is true it is supposed to open the bank. Works great, when the bot is in the bank and the bank is not open, it opens it. Then I have another class that is supposed to withdraw specific items from the bank when the following is true: @Override public boolean canProcess() { return VarWest.contains(api.myPlayer()) && api.bank.isOpen(); } Does not work, it falls past that task all the way to my debug class where I have it checking if the above is true and if so to print "true" to the log. The script knows the condition has been met because the logs show this: [INFO][04/28 12:13:05 PM]: Started bot #1 [INFO][Bot #1][04/28 12:14:31 PM]: Loaded 1 built-in random solvers! [INFO][Bot #1][04/28 12:14:31 PM]: Started script : [INFO][Bot #1][04/28 12:14:32 PM]: Opening Varrock bank [INFO][Bot #1][04/28 12:14:37 PM]: Emptying inventory [INFO][Bot #1][04/28 12:14:37 PM]: true [INFO][Bot #1][04/28 12:14:38 PM]: true [INFO][Bot #1][04/28 12:14:40 PM]: true [INFO][Bot #1][04/28 12:14:41 PM]: true [INFO][Bot #1][04/28 12:14:42 PM]: true [INFO][Bot #1][04/28 12:14:42 PM]: Terminating script .. [INFO][Bot #1][04/28 12:14:42 PM]: Script has exited! I am not sure what to make of this, the script sees that the conditions are met but never executes the class, and I have checked to see that the task is in the list of tasks loaded onStart. Any thoughts? Quote Link to comment Share on other sites More sharing options...
Token Posted April 28, 2019 Share Posted April 28, 2019 Post the script code Quote Link to comment Share on other sites More sharing options...
Naked Posted April 28, 2019 Share Posted April 28, 2019 You can add a log before the return in canProcess() You may be having an issue with something inside the process function. Quote Link to comment Share on other sites More sharing options...
sudoinit6 Posted April 28, 2019 Author Share Posted April 28, 2019 Root cause found PEBCAK error. It was processing the class, my code was just bad and I didn't have log entries in the code so it was just bypassing it. Quote Link to comment Share on other sites More sharing options...