I'm going throw Screeps (http://screeps.com/) simulation. I've stick on stage when I need to send worker to harvest resources. So I put code from the tip to the script tab, code is:
var creep = Game.creeps.Worker1;
var sources = creep.room.find(Game.SOURCES);
creep.moveTo(sources[0]);
creep.harvest(sources[0]);
My creep had started move to source, but then it froze and I got error (light red text) in console:
CPU limit reached
What I need to do to finish this step and why I'm getting this error?
From the documentation:
So it seems that your creep can't find anything to harvest within five seconds