Navigation

    forum

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

    Dwal

    @Dwal

    2
    Posts
    822
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Dwal Follow

    Posts made by Dwal

    • RE: Explanation ==ERR_NOT_IN_RANGE

      Oh I see, thank you!

      posted in Help
      Dwal
    • Explanation ==ERR_NOT_IN_RANGE

      Hi! I am pretty new to JavaScript, but I love the concpet of Screeps so it is giving me a hard time. Could anyone please explain to me why the ==ERR_NOT_IN RANGE is important?

       

      if(creep.harvest(sources[0]) == ERR_NOT_IN_RANGE) {
      creep.moveTo(sources[0]);

      }

       

      I thought that if I give a creep order to creep.moveTo(sources[0]); and then creep.harvest(sources[0]); it should do the work...

       

      Thanks.

      posted in Help
      Dwal