Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved getting a java.lang.NoSuchMethodException

Java Noob.
Joined
May 25, 2016
Messages
27
so when i try to run my bot from intellij i keep getting this error:
java.lang.NoSuchMethodException: com.seathe.bots.wispCatcher.wispCatcher.<init>()
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at nul.iIIiIIiiIiii.try(xpb:127)
at nul.iIIiIIiiIiii.try(xpb:84)
at nul.IiiiIIiiiiII.short(ltb:2698)
at java.lang.Thread.run(Unknown Source)
An error occurred while downloading information about your bots.

I've googled the error and is says that i'm missing a method somewere, but i'm stumped and don't know what i'm missing. :/

Code:
package com.seathe.bots.wispCatcher;

import com.runemate.game.api.client.embeddable.EmbeddableUI;
import com.runemate.game.api.hybrid.local.Skill;
import com.runemate.game.api.hybrid.location.Area;
import com.runemate.game.api.hybrid.location.Coordinate;
import com.runemate.game.api.hybrid.util.Resources;
import com.runemate.game.api.hybrid.util.StopWatch;
import com.runemate.game.api.script.framework.task.TaskScript;

import com.seathe.bots.wispCatcher.Tasks.catchWisp;
import com.seathe.bots.wispCatcher.Tasks.convertWisp;
import javafx.application.Platform;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;

import java.io.IOException;

/**
* Created by Seathe on 2016-05-27.
*/
public class wispCatcher extends TaskScript implements EmbeddableUI{

    private Area wispArea;

    // GUI variables
    private String location = null;
    private String status = "Loading..";
    private int caught = 0;
    private SimpleObjectProperty<Node> botInterfaceProperty;

    private String wispName = null;

    private int startDivXp = Skill.DIVINATION.getExperience();
    private int startDivLvl = Skill.DIVINATION.getCurrentLevel();

    private StopWatch runtime = new StopWatch();

    private wispCatcher() {
        setEmbeddableUI(this);
    }

    public void initialize(){
        if(location.equals("Sparkling Wisp")){
            wispName = "Sparkling wisp";
            wispArea = new Area.Rectangular(new Coordinate(2881, 3492), new Coordinate(2889, 3482));
        }

        add(new convertWisp(this), new catchWisp(this));
        runtime.start();
    }

    public void onStart(String... args){
        setLoopDelay(250, 500);
    }

    @Override
    public ObjectProperty<? extends Node> botInterfaceProperty() {
        if (botInterfaceProperty == null) {
            FXMLLoader loader = new FXMLLoader();
            loader.setController(new wispCatcherStartupController (this));
            try {
                Node node = loader.load(Resources.getAsStream("com/seathe/bots/wispCatcher/wispCatcherStartup.fxml"));
                botInterfaceProperty = new SimpleObjectProperty<>(node);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return botInterfaceProperty;
    }

    public void setRunningGui(){
        FXMLLoader loader = new FXMLLoader();
        loader.setController(new wispCatcherRunningController(this));
        try {
            Node node = loader.load(Resources.getAsStream("com/seathe/bots/wispCatcher/wispCatcherRunning.fxml"));
            Platform.runLater(() -> botInterfaceProperty.set(node));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onPause() {
        // Pause (stop) the stopwatch objects
        runtime.stop();
    }

    @Override
    public void onResume() {
        // Start the stopwatch objects again
        runtime.start();
    }


    public String getStatus() {
        return status;
    }
    public void setLocation(String location) {
        this.location = location;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public StopWatch getRuntime() {
        return runtime;
    }
    public int caught() {
        return caught;
    }
    public Area getwispArea() {
        return wispArea;
    }
    public String getwispName(){
        return wispName;
    }
    public void addCaught() {
        caught += 1;
    }

    public int getDivXp() {
        return Skill.DIVINATION.getExperience() - startDivXp;
    }
    public int getDivLvl() {
        return Skill.DIVINATION.getCurrentLevel() - startDivLvl;
    }


}

i'm some what new to java so its probably something stupid i missed :S
 
Java Noob.
Joined
May 25, 2016
Messages
27
Thank you for your reply!, so i tried that, and i still get the error. :s
 
Top