Jump to content

Trouble declaring an area.


Recommended Posts

Posted

Hi all. 

didn't have this problem in the past but now when I try make a new area it says the constructor is undefined. I have the correct imports. 

 

I declare the area like so:

 

public static Area anArea = new Area(2519, 3578, 2522, 3581);

but get this error:

The constructor Area(int, int, int, int) is undefined

something really simple I'm sure but I can't figure it out. Cheers.

Posted (edited)
1 hour ago, HunterRS said:

Show the imports

Make sure you have osbot's JAR added as an external lib

imports:

import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.Area;
import org.osbot.rs07.api.GrandExchange;
import org.osbot.rs07.api.Prayer;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.api.Bank.BankMode;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.Player;
import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.event.WalkingEvent;
import org.osbot.rs07.input.mouse.InventorySlotDestination;
import org.osbot.rs07.input.mouse.RectangleDestination;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.Bot;
import org.osbot.rs07.api.map.Position;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

and the Jar is 100% added 

I tried important another area import earlier & I remember it just bringing up errors. I'm sure this will be the issue but cant figure it out 

Edited by uyfgfarOS

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