JS3 Posted July 10, 2018 Author Share Posted July 10, 2018 2 hours ago, progamerz said: add a smithface not null, i am on phone can't write much atm.. No Worries! Thanks for response, the null check fixed the error. Thank you Quote Link to comment Share on other sites More sharing options...
Rays Posted July 10, 2018 Share Posted July 10, 2018 41 minutes ago, m3JS said: No Worries! Thanks for response, the null check fixed the error. Thank you Basically, OSBot will spas out if you forget to check for null. Quote Link to comment Share on other sites More sharing options...
Athylus Posted July 10, 2018 Share Posted July 10, 2018 On 7/6/2018 at 7:36 PM, m3JS said: Great feedback and thank you for the suggestions! My goal is to create bigger and more complex scripts but to also put forth my efforts back to the community. I have tried to go back to not using States and enums as I am fairly new to Java and don't understand fully why to use enums over not using them. I think I need to go back and do some basic Java to better understand everything. I used the tutorials @Chris made and scanned through a lot of snippets and other forum posts. As for the widget, I was thinking about that this morning, I am gonna do some separate tests off script to practice. You are welcome! And I would like to mention you are well under your way. Remember that an enum is just a way to store data, just like a string. You could make a string array of 'states' and use that in the same mechanism as well. For widgets I only check if they are null and that works for me. 1 Quote Link to comment Share on other sites More sharing options...