Liink cooldown and error ERR_TIRED



  • My link has Cooldown = 0, but calling "transferEnergy" on it results in ERR_TIRED. Source link is full, target link is empty. After some time the transfer eventually happens, but it takes something like 100 ticks.

     

    Cooldown value of link logged on each tick:

    [12:19:14 PM]Tired: 13
    [12:19:18 PM]Tired: 12
    [12:19:22 PM]Tired: 13
    [12:19:28 PM]Tired: 10
    [12:19:32 PM]Tired: 10
    [12:19:38 PM]Tired: 13
    [12:19:42 PM]Tired: 12
    [12:19:47 PM]Tired: 13
    [12:19:52 PM]Tired: 10
    [12:19:58 PM]Tired: 4
    [12:20:01 PM]Tired: 12
    [12:20:07 PM]Tired: 12
    [12:20:12 PM]Tired: 12
    [12:20:16 PM]Tired: 13


  • Dev Team

    Hey Qrees,

     

    Could you give us some more details?

    Could you also print out the link id's (from and to) and the tick time (Game.time). We'd like to find out what's wrong in this case.



  • Ok, I have found what was the issue. I was calling Game.getObjectById(...) before "loop" was started. The first time the method is called it seems to work, but later it seems to return old instance of the object (or some other garbage).

     

    Maybe the method should fail when being called before "loop"?