Possible issue with getUniqueName



  • I just got an email notification with this error from shard0. My room looks like it's still functioning normally, so I think the error was harmless.

            name = require('./names').getUniqueName(i => {
                                      ^
    TypeError: require(...).getUniqueName is not a function
        at .createCreep (evalmachine.<anonymous>:1:72)
        at module.exports (world:180:27)
        at main:6:1
        at sigintHandlersWrap (vm.js:32:31)
        at sigintHandlersWrap (vm.js:73:12)
    

    Does anyone know why getUniqueName would stop being a function for a tick?


  • SUN

    isn't that "getUniqueName" belonging to your code ?



  • No, getUniqueName isn't in my code.

    This is the line in my world module that referenced in the traceback.

    var r = spawn.createCreep([TOUGH, RANGED_ATTACK, RANGED_ATTACK, MOVE], undefined, {role: 'pewpew'});
    

    Since I don't give that creep a name, the createCreep function generates one automatically.



  • I've seen that a few times. It has always resolved itself after a few ticks.



  • Same for me.


  • Dev Team

    Please note that StructureSpawn.createCreep is considered deprecated, use StructureSpawn.spawnCreep instead.