Jump to content

compiling issues


Recommended Posts

Posted

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?

Posted

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)

Posted (edited)
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
Posted (edited)
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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