Can't suicide creeps reliably in world since the update
-
https://screeps.com/a/#!/history/W5N12?t=13052308
http://i.imgur.com/kDikavK.png - no creep there.
if (theCreep.memory.role == undefined)
{
var message = 'Creep with no role found: \n' + theCreep.name + '\nTick: ' +Game.time + '\nMemory: ' + JSON.stringify(theCreep.memory);
if(!Game.rooms['sim'])
{
Game.notify(message, 0);
log(message, "error");
}
theCreep.suicide()
return;
}Every tick the creep still think he's alive. While it's impossible for it to be alive. This happened multiple times since the downtime of 23-8-2016.
-
I can barely understand what are you reporting. Please elaborate what you expect and what you get.
-
If a creep has no role (due to a bug) I suicide the creep using .suicide().
This normally never happens, only when the memory gets corrupted for some reason.
Since this morning
theCreep.suicide()no longer works.
each tick the same creep gets a .suicide() call, but it doesn't die and still lives next tick.
The creep is gone from the game, but it seems the Game.creeps still holds an object to a no longer living creep.
-
Example:
Creep with no role found: C_38918 Tick: 13052502 Memory: {} pos: [room W3N11 pos 40,29]Creep with no role found: C_38918 Tick: 13052503 Memory: {} pos: [room W3N11 pos 40,29]The creep should have suicided on tick 13052502, but is still alive on 13052503
-
I'm unable to reproduce this. Could you provide a clear isolated test case which proves the issue?
-
I can't.
My creeps suicide themselves from time to time and delete their own memory.
I don't know if you can see the emails that are send to me from my code, but it looks like this lately:
http://i.imgur.com/PTQqC4g.png
You can see it's always creep
C_38918
in this case.
As you can see from the code above it should always suicide it after one message.
-
It seems to be related when you suicide a creep and you code "dies" the same tick due to a CPU limit.
-
Seems to be related to when your bucket is empty and the script gets cancelled mid-run, and a creep has been suicided on that cpu-bucket-empty tick.