Oh I see, thank you!
Dwal
@Dwal
2
Posts
647
Profile views
0
Followers
0
Following
Posts made by 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.