Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Mitsuyoshi
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Mitsuyoshi

    @Mitsuyoshi

    1
    Posts
    927
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Mitsuyoshi Follow

    Posts made by Mitsuyoshi

    • RE: ERR_NO_PATH when creep moveTo flag in another room

      I solved the issue with this code, and I hope it costs less CPU than the method using maxOps.

          if (creep.moveTo(pos) == ERR_NO_PATH) {
            if (this.pos.x <= 1) {
              if (this.move(RIGHT) == OK) {
                return
              }
            }
            if (this.pos.x >= 48) {
              if (this.move(LEFT) == OK) {
                return
              }
            }
            if (this.pos.y <= 1) {
              if (this.move(BOTTOM) == OK) {
                return
              }
            }
            if (this.pos.y >= 48) {
              if (this.move(TOP) == OK) {
                return
              }
            }
          }
      

      It seems like when a creep is not on the room border, the creep can find a path.

      posted in Technical Issues and Bugs
      Mitsuyoshi