ERR_NO_PATH


  • YP

    Has anyone discovered a work around for the ERR_NO_PATH bug when moving to and from certain rooms?



  • This doesn't sound like a bug.

    When your path is blocked by constructed walls you won't be able to pathfind to it.

     

    There are a few strategies you can try to help address this challenge:

    • create and cache your own costmatrix
    • use findRoute and then only pathfind from your current position to the other side of the exit you want to take (or the one after that if you have vision of the room)


  • I think this happens more frequently with the default path finding logic. I have had this in many rooms where there are swamps in the way. I think the path finder simply gives up after a while. I usually "solve" it by building roads, but the long term solution will be to add smarter path finding. One such option is to activate the PathFinder module and start making your own cost matrix.

    More about that here: http://support.screeps.com/hc/en-us/articles/207023879-PathFinder


  • YP

    Thanks all,

     

    I got it figured out.  I used the {maxRooms:1} option when in the target room and it fixed the issue of continuously swapping rooms.

     

    Thanks for the quick feedback! 🙂