Problem with Task

Discussion in 'Developer Support' started by Grumble, Dec 30, 2014.

  1. Hi,
    I am currently making a script bot 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.
    [​IMG]

    Here goes the error;
    [​IMG]

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

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

     
  2. Is WalkToMine in the same package as your main script bot? 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.
     
  3. WalkToMine is in the same package as my main script bot,yes.
     
  4. 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.
     
  5. I restarted 2 times already Eclipse.It's weird.I wait my time out like you said,maybe Cloud can look into this.
     
  6. Eclipse = cancer. Switch to IntelliJ
     
  7. It's definitely not an API bug. Try putting it in a different package (tasks should be in a subpackage anyway) and importing.
     
  8. Problem has been fixed.Found it out.


    CLOSE
     
  9. Funfact, you can replace your whole for loop with this one line.

    tasks.stream().filter(Task::validate).forEach(Task::execute);
     
    Grumble likes this.
  10. What was the issue?

    Also, 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.
     
  11. I did place my task wrong,I tried to put it elsewhere and now it works.It's still weird but it works.
     

Share This Page

Loading...