if(creep.memory.reparing && creep.carry.energy == 0) {        <- typo here on repaIring   i suggest use console.log or creep.say to debug the execution path and find issues like this