Game.getObjectById() returns null when passed the source.id of a source in an unclaimed room.
-
Game.getObjectById() returns null when passed the source.id of a source in an unclaimed room.
I have a creep in the room, but I can't change a sourceID (I verified its correct in the UI) into a GameObject? It works in my own room.
How do I harvest an unclaimed source?
-
Post a screenshot of this happening when you do it in the console?
-
I found here (http://screeps.wikia.com/wiki/GetObjectById) why it's like that:
It will only provide you the object if you have visibility in the room, otherwise, it will return null.