FuryShark Posted May 8, 2018 Share Posted May 8, 2018 2 hours ago, Apaec said: Most likely you've got multiple jars in your scripts folder with the same script manifest name ? You can test this by moving all your local scripts elsewhere (e.g your desktop), and only having your simple script in the directory. Then start OSBot and see if it shows up. If it still does not, let me know! -Apa This didnt change anything, but when i gave it to my friend, he decompiled the jar i sent him then recompiled and gave it to me and it showed up. he didnt change anything in the script. and we both did exactly the same method thats shown in your tutorial for exporting. Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 8, 2018 Author Share Posted May 8, 2018 14 minutes ago, FuryShark said: This didnt change anything, but when i gave it to my friend, he decompiled the jar i sent him then recompiled and gave it to me and it showed up. he didnt change anything in the script. and we both did exactly the same method thats shown in your tutorial for exporting. You must've made a mistake somewhere then! Either in the manifest, or in attaching the OSBot jar. You can test where the error is by seeing if the skeleton code that I provided shows up when compiled. If it shows up, then your error is in your manifest (or elsewhere in the source). If it doesn't show up, then you've probably attached the jar incorrectly? Does your script have any errors/red underlines when you compile it? This is important, as if there is even one error, the script will fail compilation. Also, keep in mind that compilation is not a perfectly reversible process, i.e if you decompile then recompile a script, you are not guarenteed to get back to the perfect original source code. -Apa Quote Link to comment Share on other sites More sharing options...
FuryShark Posted May 8, 2018 Share Posted May 8, 2018 20 minutes ago, Apaec said: You must've made a mistake somewhere then! Either in the manifest, or in attaching the OSBot jar. You can test where the error is by seeing if the skeleton code that I provided shows up when compiled. If it shows up, then your error is in your manifest (or elsewhere in the source). If it doesn't show up, then you've probably attached the jar incorrectly? Does your script have any errors/red underlines when you compile it? This is important, as if there is even one error, the script will fail compilation. Also, keep in mind that compilation is not a perfectly reversible process, i.e if you decompile then recompile a script, you are not guarenteed to get back to the perfect original source code. -Apa no red lines osbot jar attached. :S Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 8, 2018 Author Share Posted May 8, 2018 8 minutes ago, FuryShark said: no red lines osbot jar attached. :S Ahhh!! I see what's up! Looks like you've got the wrong JDK. OSBot is written for Java 8 and is incompatible with later revisions. See where it says 'JRE System Library [JavaSE-10]' in your screenshot? Right click that, select properties, and change the execution environment to 'Java-SE-1.8' Here's the d/l link: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html Let me know if that works -Apa 1 Quote Link to comment Share on other sites More sharing options...
FuryShark Posted May 8, 2018 Share Posted May 8, 2018 1 hour ago, Apaec said: Ahhh!! I see what's up! Looks like you've got the wrong JDK. OSBot is written for Java 8 and is incompatible with later revisions. See where it says 'JRE System Library [JavaSE-10]' in your screenshot? Right click that, select properties, and change the execution environment to 'Java-SE-1.8' Here's the d/l link: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html Let me know if that works -Apa It appears now tyty 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 17, 2018 Author Share Posted May 17, 2018 Update 17-05-2018: Minor changes and a few fixed typos. Also embedded images instead of just posting links. ___ Apa Quote Link to comment Share on other sites More sharing options...
The Devil Posted May 17, 2018 Share Posted May 17, 2018 26 minutes ago, Apaec said: Update 17-05-2018: Minor changes and a few fixed typos. Also embedded images instead of just posting links. ___ Apa If i were an air bender id fly you. Thanks for this apa! Iv been using code academy and starting to understand the basics but what those online teachers like code academy and code combat dont teach you is how to write for a program and this helped my understanding a lot! 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 17, 2018 Author Share Posted May 17, 2018 15 minutes ago, thedevilhacker said: If i were an air bender id fly you. Thanks for this apa! Iv been using code academy and starting to understand the basics but what those online teachers like code academy and code combat dont teach you is how to write for a program and this helped my understanding a lot! Glad to hear it, best of luck learning! Let me know if you have any questions --Apa Quote Link to comment Share on other sites More sharing options...
spanishguy Posted June 15, 2018 Share Posted June 15, 2018 @Apaec Thanks for this! It all seems to make sense. So essentially, your onLoop part of the script will always expand into Defining, Null Check, and Interaction + Delays, Fail Checks? Where these are further defined using "if" and "else if" statements? This basic principle applies to all scripts? Quote Link to comment Share on other sites More sharing options...
Apaec Posted June 15, 2018 Author Share Posted June 15, 2018 7 hours ago, spanishguy said: @Apaec Thanks for this! It all seems to make sense. So essentially, your onLoop part of the script will always expand into Defining, Null Check, and Interaction + Delays, Fail Checks? Where these are further defined using "if" and "else if" statements? This basic principle applies to all scripts? So the onLoop is continuously called, i.e looping. From what you've said, you seem more or less right, although fail checks can often be implemented as their own state in the onLoop (remember, to maximise robustness, have only a single interaction per onLoop call) rather than 'sequentially'. I'm not entirely sure what you mean by your first question regarding if and else if statements. With regards to your second question, yes - if you go down deep enough, these basic principle apply. However with more complicated scripts this detail is often abstracted away using OO concepts which is a powerful way to encode more meaning/functionality/diversity into a comparatively smaller code size. Apa 1 Quote Link to comment Share on other sites More sharing options...
King Ryan Posted June 15, 2018 Share Posted June 15, 2018 @ApaecQuestion for you on IDE's between IntelliJ and Eclipse, are the main differences preference, or do you prefer eclipse for a reason? I'm just starting to learn to code, and want to start on the right path. Quote Link to comment Share on other sites More sharing options...
Deceiver Posted June 15, 2018 Share Posted June 15, 2018 23 minutes ago, CPRulez said: @ApaecQuestion for you on IDE's between IntelliJ and Eclipse, are the main differences preference, or do you prefer eclipse for a reason? I'm just starting to learn to code, and want to start on the right path. eclipse is bit more geared towards newer people but intellijs features eclipse eclipse's features by far 1 Quote Link to comment Share on other sites More sharing options...
King Ryan Posted June 15, 2018 Share Posted June 15, 2018 1 hour ago, Deceiver said: eclipse is bit more geared towards newer people but intellijs features eclipse eclipse's features by far I see what you did there... Quote Link to comment Share on other sites More sharing options...
Apaec Posted June 16, 2018 Author Share Posted June 16, 2018 15 hours ago, CPRulez said: @ApaecQuestion for you on IDE's between IntelliJ and Eclipse, are the main differences preference, or do you prefer eclipse for a reason? I'm just starting to learn to code, and want to start on the right path. As deceiver said, intelliJ is far more... intelligent. It has loads more features and is generally the tool of preference at the moment. I use eclipse for OSBot scripts mostly because it is what I learned to use initially. The interface is comparatively simplistic and in my opinion more intuitive for people starting out. I do use other IDEs and sometimes plain text editors for other java projects. It's preference really - use whichever you are more comfortable with! 1 Quote Link to comment Share on other sites More sharing options...
King Ryan Posted June 16, 2018 Share Posted June 16, 2018 5 hours ago, Apaec said: As deceiver said, intelliJ is far more... intelligent. It has loads more features and is generally the tool of preference at the moment. I use eclipse for OSBot scripts mostly because it is what I learned to use initially. The interface is comparatively simplistic and in my opinion more intuitive for people starting out. I do use other IDEs and sometimes plain text editors for other java projects. It's preference really - use whichever you are more comfortable with! Thanks just getting into scripting and obviously wanted to start the right way haha. 1 Quote Link to comment Share on other sites More sharing options...