Code:
module.exports.loop = function () {
console.log(Game.time)
console.log(Game.creeps["ranger-Spawn12-W6S22-7933113"]);
console.log(Game.creeps["ranger-Spawn12-W6S22-7933113"].pos);
return;
result:
[12:58:28] [shard1] [room E0S20 pos 13,30]
[12:58:29] [shard2] 7933879
[12:58:29] [shard2] undefined
[12:58:29] [shard2] TypeError: Cannot read property 'pos' of undefined
at Object.module.exports.loop (main:27:61)
at __mainLoop:1:52
at __mainLoop:2:3
at Object.exports.evalCode (:15727:76)
at Object.exports.run (:30153:24)
[12:58:31] [shard1] 10180203
[12:58:31] [shard1] [creep ranger-Spawn12-W6S22-7933113]
[12:58:31] [shard1] [room E0S20 pos 13,30]
[12:58:32] [shard2] 7933880
[12:58:32] [shard2] undefined
[12:58:32] [shard2] TypeError: Cannot read property 'pos' of undefined
at Object.module.exports.loop (main:27:61)
at __mainLoop:1:52
at __mainLoop:2:3
at Object.exports.evalCode (:15727:76)
at Object.exports.run (:30153:24)
[12:58:34] [shard1] 10180204
[12:58:34] [shard1] [creep ranger-Spawn12-W6S22-7933113]
[12:58:34] [shard1] [room E0S20 pos 13,30]