a10101 Posted May 17, 2018 Posted May 17, 2018 package Looter; import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "Looter", author = "First script...", version = 1.0, info = "Looter", logo = "") public class main extends Script { private Filter<GroundItem> exists = a --> exists(); @Override public void onStart() { } @Override public void onExit() { } @Override public int onLoop() throws InterruptedException { GroundItem a = groundItems.closest(exists); if (a != null && a.exists()) { a.interact("Take"); sleep(2000); } return 100; } @Override public void onPaint(Graphics2D g) { } } Gives me the error below, but works for other people and compiles just fine. I thought it was written properly, and it is, but this script isn't compiling for me... Error: https://gyazo.com/fa635ed256c8cc8c74d2dd4d7b375285
The Devil Posted May 17, 2018 Posted May 17, 2018 (edited) Any reason the line you posted in the source is private Filter<GroundItem> exists = a --> exists(); And the line you posted in the gyazo is private Filter<GroundItem> exists = a --> a.exists(); Im still learning about scripting but if you have one version with "exists();" and another with "a.exists();" You might be sending the working code to your friends and trying the compile to broken one on your computer? EDIT** Yeah iv been looking at this trying to fix for a half hour but my experience is very low. I hope someone can come here and give a solution. It would be nice to know what the issue is as a fellow beginner. Edited May 17, 2018 by thedevilhacker