So I've been playing this game since yesterday, and tried to make my harvester code more intelligent using flags, placed on the sources (to store information).
However, something goes wrong when I try to access the flags memory, because they behave as if they do not exist. (source refers to the corresponding source (this works, as it places the flag at the right spot)
var title = Game.spawns.Spawn1.room.createFlag(source.pos);
console.log('Making Flag: ' + title); //Prints: Making Flag: Flag1
Game.flags[title].memory.spots = 3; //Here is the error
To at the last line it goes wrong and I cannot seem to get it fixed (I'm not experienced in programming, so it might be very obvious.