ERR_NO_PATH when changing rooms



  • When moving a creep to an exit with

    creep.moveTo(new RoomPosition(creep.memory.exit.x, creep.memory.exit.y, creep.memory.exit.roomName), { reusePath: _ticksReusePath })

    it returns always (99% of the time) ERR_NO_PATH

    It only happens when changing from one specific room to another specific room, all other creeps/rooms are woking fine.

    Someone has an idea how to work around this? I can't find anything wrong in my code, so it has to be anything else.

     

     



  • Are you sure that the exit (or one possible exit) is not walled off?



  • Please make sure that creep.memory.exit.roomName is visible to you. You cannot create new RoomPosition in rooms that you don't have any creeps or structures in it.

     



  • There is also a bug with room borders which are adjacent to large swamps... 

    The current algorithm implementation seems to be unable to find a path from a border position, when the only possible next move is to an other border position (which is no option since it would result in a room jump) or to a swamp field (which should be a valid move but seems to be ignored). 



  • I think it is the bug, as there is no way for the creep not moving over swamps to the exit.
    Thank you for clearifing this,I'll try to build some roads. Hopefully the bug will be fixed someday.