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.

Getting the error, cannot find symbol class Message, any tips? Thank you

Featured Replies

Hi, I'm a beginner learning how to script and following this guide 

I'm on Step 4 The Script Class Continued, trying to add the following code 

@Override
public final void onMessage(final Message message) {
    log("A message arrived in the chatbox: " + message.getMessage());
}

 This gives me the error 

  • cannot find symbol class Message

It seems a simple fix like I'm not including a library or something, but I can't find anything online.

Here is my current code. 

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "IronMike5424", name = "An Example Script", info = "Just an empty script :(", version = 0.1, logo = "")
public final class Skeleton extends Script  {
    @Override
    public final int onLoop() throws InterruptedException {
        return 0;
    }

    @Override
    public final void onStart() {
        log("This will be printed to the logger when the script starts");
    }

    @Override
    public final void onExit() {
        log("This will be printed to the logger when the script exits");
    }


    public final void onMessage(final Message message) {
        log("A message arrived in the chatbox: " + message.getMessage());
    }


}

@CheckingItOut

You are missing the import for the Message class.

I would recommend giving this a look, https://stackoverflow.com/questions/25706216/what-does-a-cannot-find-symbol-or-cannot-resolve-symbol-error-mean

It will help explain the error in detail.

Adding this to your imports, should fix this though;

import org.osbot.rs07.api.ui.Message;

Edited by BravoTaco

4 hours ago, CheckingItOut said:

Will do!  Big thank you for the help @BravoTaco

No worries.

Any questions feel free to PM me.

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.