Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error message on my new script

Featured Replies

You need to post a lot more detail.
I'm not even completely sure of what your issue is by reading this.

  • Author

You need to post a lot more detail.

I'm not even completely sure of what your issue is by reading this.

This is the deal

 

i made a script in eclipse took the code putted it in a notepad saved it as a jar file and then it wouldn't load in osbot.

This is the deal

 

i made a script in eclipse took the code putted it in a notepad saved it as a jar file and then it wouldn't load in osbot.

 

Did you compile it? You can't just save it with a ".jar" extension and use it as a local script.

  • Author

Did you compile it? You can't just save it with a ".jar" extension and use it as a local script.

posted the script

From what you posted I am not sure you were compiling it correctly from your description but the code was wrong also. The methods onStart(), onExit(), and onLoop() need to be overridden and to do that they need to be spelled the same. you used onstart() instead of onStart(). and the E needs to be capitalized on onExit() and the L in onLoop(). When you override a method you can add @Override above the method and if the spelling is wrong it will let you know that nothing it being overriden, there is other reasons for using @Override but that is one way to know you are spelling the method correctly. After that the script ran as expected I would assume, it teled me to cammy. 

 

To be sure you are compiling it right, there are guides here for all this stuff but this is what you do. If using eclipse right click the project and go to export, go to java and choose jar file, make sure the project you are using is selected and make sure the file path is right and click finish, it will then compile the code and package it into a jar for you. 

 

I'm not the best with explanations but after fixing the spelling on those methods the script did run. 

  • Author

From what you posted I am not sure you were compiling it correctly from your description but the code was wrong also. The methods onStart(), onExit(), and onLoop() need to be overridden and to do that they need to be spelled the same. you used onstart() instead of onStart(). and the E needs to be capitalized on onExit() and the L in onLoop(). When you override a method you can add @Override above the method and if the spelling is wrong it will let you know that nothing it being overriden, there is other reasons for using @Override but that is one way to know you are spelling the method correctly. After that the script ran as expected I would assume, it teled me to cammy. 

 

To be sure you are compiling it right, there are guides here for all this stuff but this is what you do. If using eclipse right click the project and go to export, go to java and choose jar file, make sure the project you are using is selected and make sure the file path is right and click finish, it will then compile the code and package it into a jar for you. 

 

I'm not the best with explanations but after fixing the spelling on those methods the script did run. 

Edit= got 13 error instead of 8 now lol

Edited by riet

That's just a simple mistake that can easily be missed if you aren't used to coding, since it isn't technically an error. You could have called your onloop() method inside the onLoop() method and it would have ran fine since they are completely different methods with that capitalization difference, because your methods was a perfectly fine method but the client was using its onLoop() instead of yours since you never overrote its method.

 

when you do a paint don't forget the P on onPaint(Graphics g)  smile.png

 

That kinda spelling, I have always known it as camel case since the start of every word after the first is capitalized, is how most people do all their methods, and variables so you will get used to that.


Edit= got 13 error instead of 8 now lol

Error on line 13? by looking at your previously posted code I am going to assume onStart() is spelled wrong? I copied and pasted your code fixed the spelling on the 3 methods and it tele'd me.

Edited by Deck

  • Author

That's just a simple mistake that can easily be missed if you aren't used to coding, since it isn't technically an error. You could have called your onloop() method inside the onLoop() method and it would have ran fine since they are completely different methods with that capitalization difference, because your methods was a perfectly fine method but the client was using its onLoop() instead of yours since you never overrote its method.

 

when you do a paint don't forget the P on onPaint(Graphics g)  smile.png

 

That kinda spelling, I have always known it as camel case since the start of every word after the first is capitalized, is how most people do all their methods, and variables so you will get used to that.

Error on line 13? by looking at your previously posted code I am going to assume onStart() is spelled wrong? I copied and pasted your code fixed the spelling on the 3 methods and it tele'd me.

Where and how did you compile it i got this now

 

http://pastebin.com/3nfqxGJC

Edited by riet

That is is correct now, so you just need to get the compiling correct. I'm sure there is a tutorial somewhere on here but i'll try to explain how I do it. 

 

For eclipse:

1. On the right you will see the Package Explorer. Here all your projects will be. You are going to want the to right click the project, not the java file. By allowing .jar instead of .class which would be one java file, you can have multiple class files in your project. 

When you have right clicked the Project Folder in the Package Explorer, you will see "Export" select this.

 

2. There is now multiple folders such as General, Install, Java, etc. Pick Java, this will drop down to where you have JAR file, Javadoc, Runnable Jar file, to choose from. We want a .jar package so select JAR file and click next.

 

3. I have the box beside my project selected, then underneath there are 4 check boxes and I have only the first one checked, "Export generated class files and resources".

 

4. Still on the same screen you will see Select the export destination. This is where it will put the .jar package. I set this to my scripts folder so I can export and it is already ready to run. 

 

now you should be able to just go to your local scripts and run it. You will have to refresh the local script with every export you do.

  • Author

That is is correct now, so you just need to get the compiling correct. I'm sure there is a tutorial somewhere on here but i'll try to explain how I do it. 

 

For eclipse:

1. On the right you will see the Package Explorer. Here all your projects will be. You are going to want the to right click the project, not the java file. By allowing .jar instead of .class which would be one java file, you can have multiple class files in your project. 

When you have right clicked the Project Folder in the Package Explorer, you will see "Export" select this.

 

2. There is now multiple folders such as General, Install, Java, etc. Pick Java, this will drop down to where you have JAR file, Javadoc, Runnable Jar file, to choose from. We want a .jar package so select JAR file and click next.

 

3. I have the box beside my project selected, then underneath there are 4 check boxes and I have only the first one checked, "Export generated class files and resources".

 

4. Still on the same screen you will see Select the export destination. This is where it will put the .jar package. I set this to my scripts folder so I can export and it is already ready to run. 

 

now you should be able to just go to your local scripts and run it. You will have to refresh the local script with every export you do.

You are so terribly awesome  i got no words for it thank you so much man if i can do anything for you like vouche just say and i will

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.