Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trouble declaring an area.

Featured Replies

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.

  • Author
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

You imported the wrong area.
You used 

import java.awt.geom.Area;

You need

import org.osbot.rs07.api.map.Area;

 

Edited by HunterRS

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.