Well, i did get the creeps to go to the other room by the following code and hardcoding the room name into the memory of the creep.
But i would still like to know how to fix the flags problem in memory
var claimers = _.filter(Game.creeps, (creep) => creep.memory.role == 'claimer');
if (claimers.length < 2) { console.log(Game.spawns['Spawn1'].createCreep([CLAIM, MOVE], undefined, {role: 'claimer', targetRoom: "roomnamehere"})); }
module.exports = { run: function(creep){ if(creep.memory.targetRoom != creep.room.name){ var exits = Game.map.findExit(creep.room, creep.memory.targetRoom); var exit = creep.pos.findClosestByRange(exits); creep.moveTo(exit) } else { if(creep.room.controller) { if(creep.reserveController(creep.room.controller) == ERR_NOT_IN_RANGE) { creep.moveTo(creep.room.controller); } } } }}