Jump to content

Issue with Entitiy API methods


brandon417

Recommended Posts

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