Jump to content

compiling issues


Kangabr

Recommended Posts

Hey all, Its been awhile but I am coming back to osrs development and had a quick question, I have a little test script built and am trying to compile it but something is going wrong.. I am not sure if something changed or I am doing something wrong, but, I used to compile and write in eclipse. But now, when I compile it isn't compiling correctly. First thing i noticed was compiling errors in the console so I tried a few things to test it, Turns out, even with my script manifest commented out, when I compile to my script folder in OSBot it still has a name and author on it when refreshed in the client. As well as uncommented and name changed it still says an original name which the script used while it was being built. Has anyone seen this or have any recommendations?

Link to comment
Share on other sites

here is the error if it helps

 

 

[ERROR][Bot #1][12/25 10:59:38 PM]: Error in bot executor or from Error class (and not Exception)!
java.lang.Error: Unresolved compilation problem: 
    The type Main must implement the inherited abstract method Script.onLoop()

    at Core.Main.onLoop(Main.java:56)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(tk:46)
    at java.lang.Thread.run(Thread.java:748)

Link to comment
Share on other sites

6 hours ago, Kangabr said:

here is the error if it helps

 

 

[ERROR][Bot #1][12/25 10:59:38 PM]: Error in bot executor or from Error class (and not Exception)!
java.lang.Error: Unresolved compilation problem: 
    The type Main must implement the inherited abstract method Script.onLoop()

    at Core.Main.onLoop(Main.java:56)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(tk:46)
    at java.lang.Thread.run(Thread.java:748)

 

You're  either missing the onLoop function which is required, or it has the wrong signature. See section 2 of the following: https://osbot.org/forum/topic/115124-explvs-scripting-101/

Edited by Explv
Link to comment
Share on other sites

11 hours ago, Explv said:

 

You're  either missing the onLoop function which is required, or it has the wrong signature. See section 2 of the following: https://osbot.org/forum/topic/115124-explvs-scripting-101/

 

@Override

                     public final int onLoop() throws InterruptedException {

                          switch (getState()) {

                     case CHICKENS:

                              chickenWALK();

                              setAttackStyles1(); //switch style

                              chickenFIGHT();

                              break;

                     case IDLE:

                              chickenWALK(); //testing for the bug

                              break;

                      }

        return 0;

    }

 

Edited by Kangabr
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...