为什么这段代码有这么多错误?

时间:2013-12-06 00:53:33

标签: java compiler-errors jcreator

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.powerbot.core.script.job.Task;
import org.powerbot.core.script.job.state.Node;
import org.powerbot.core.script.job.state.Tree;
import org.powerbot.game.api.util.Timer;

public abstract class ScriptWrapper extends org.powerbot.core.script.ActiveScript {

    public final Timer runTime;
    private Tree jobContainer = null;
    private List<Node> jobs;


    public ScriptWrapper() {
        runTime = new Timer(0);
        jobs = Collections.synchronizedList(new ArrayList<Node>());
    }

    public final void provide(final Node job) {
        if(!jobs.contains(job)) {
            jobs.add(job);
            jobContainer = new Tree(jobs.toArray(new Node[jobs.size()]));
        }
    }

    public final void revoke(final Node job) {
        if(jobs.contains(job)) {
            jobs.remove(job);
            jobContainer = new Tree(jobs.toArray(new Node[jobs.size()]));
        }
    }

    public final void submit(final Task task) {
        getContainer().submit(task);
    }

    public final ScriptWrapper getScriptWrapper() {
        return this;
    }

    public abstract void onStart();

    @Override
    public int loop(); {
        if (jobContainer != null) {
            final Node job = jobContainer.state();
            if (job != null) {
                jobContainer.set(job);
                getContainer().submit(job);
                job.join();
            }
        }
        return 0;
    }
}

这段代码中有很多错误,我不知道如何解决这个问题,因为我是初学者,当我修复了十多个弹出窗口时,例如当我修复了解析错误23时出现了错误。我只有15个编码类。

1 个答案:

答案 0 :(得分:0)

您必须将ActiveScript库添加到代码中,然后修复错误:)