Welcome!

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

Sign up now!

Problem with Task

Don't hate the player, hate the game
Joined
May 8, 2014
Messages
99
Hi,
I am currently making a script that's using Tasks.I got 3 tasks now and if I try to implent 1 task it gives an error.I have the right import.
b72aac8de97828ee6868c020a0980232.png


Here goes the error;
7c78fc29a700a83b08400c5a217c931d.png


I don't know why,but they're all tasks.

618b4f633a9bfb1089ed4329b0bcdb53.png

I know the code isnt good at the Task right now,don't blame for this.

 
Joined
Dec 18, 2014
Messages
398
Is WalkToMine in the same package as your main script? If not, is it imported? If not, import it manually.
Also, all classes should start with an uppercase. mineClay and bankClay should be MineClay and BankClay.
 
Joined
Dec 18, 2014
Messages
398
This probably isn't your fault because my Eclipse had the same problem an hour ago. It might go away by itself later. Or you could exit Eclipse and reopen it and see if the problem persists.
 
Don't hate the player, hate the game
Joined
May 8, 2014
Messages
99
This probably isn't your fault because my Eclipse had the same problem an hour ago. It might go away by itself later. Or you could exit Eclipse and reopen it and see if the problem persists.

I restarted 2 times already Eclipse.It's weird.I wait my time out like you said,maybe Cloud can look into this.
 
Joined
Dec 18, 2014
Messages
398
I restarted 2 times already Eclipse.It's weird.I wait my time out like you said,maybe Cloud can look into this.

It's definitely not an API bug. Try putting it in a different package (tasks should be in a subpackage anyway) and importing.
 
Joined
Apr 17, 2014
Messages
19
Funfact, you can replace your whole for loop with this one line.

tasks.stream().filter(Task::validate).forEach(Task::execute);
 
Don't hate the player, hate the game
Joined
May 8, 2014
Messages
99
What was the issue?

Also, I a TaskScript's onLoop is final, so you can't override it. You should use a TaskScript if you're using Tasks and not doing anything special with the onLoop.

I did place my task wrong,I tried to put it elsewhere and now it works.It's still weird but it works.
 
Top