Try this:  var mainRoomEnergy = Game.rooms[myRoomName].energyAvailable;  You will also need SIGHT on the room. That means there must be some creep or structure of yours inside the room or you must use the observer...