cerco di usare findNearest così:findNearest, findInRange - Come utilizzare in Screeps?
var sources = creep.room.findNearest(Game.SOURCES)
creep.moveTo(sources[0]);
creep.harvest(sources[0]);
e questo è ciò che ottengo:
TypeError: undefined is not a function
at module.exports:5:28
at <main>:11:6
Come utilizzare questo metodo e findInRange in modo che essi non causano questo errore?
Si prega di includere il contenuto che si collega direttamente nella risposta; collegamenti rot. –