Jump to content

Trouble declaring an area.


Recommended Posts

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.

Link to comment
Share on other sites

1 hour ago, HunterRS said:

Show the imports

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


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

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