Jump to content

Issue with Entitiy API methods


Recommended Posts

Posted (edited)

Hi people, I am new to writing scripts and have a very frustrating issue preventing my script from running. I have a simple script to pick wheat but when I try to call the EntityAPI methods, I get the error: Cannot make a static reference to the non-static method closest(String...) from the type EntityAPI. I am also pretty rusty with Java coding so if somebody could explain my mistake here that would be helpful. It's probably a simple solution but I cannot figure it out sad.png

 

Some of my code:

 

import org.osbot.rs07.api.EntityAPI;
import org.osbot.rs07.api.model.Entity;
 

 

final String WHEAT_NAME = "wheat";

 

public int onLoop(){
 
/* Only error of program is on this line */
Entity wheat = closest(WHEAT_NAME); //I have also tried EntityAPI.closest(WHEAT_NAME);
 
return 0;
}
Edited by brandon417

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...