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
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;
}