as an FYI - i kinda got this to work... the script runs but now its just not working... i dont think my increment is appending correctly and im having duplicate creeps.
var hc = 0;
var uc = 0;
var bc = 0;
if(!Game.spawns.Spawn1.spawning) {
if (Game.spawns.Spawn1.room.find(FIND_MY_CREEPS, { filter: function(creep){ return creep.memory.role == 'harvester'; }}).length < 3)
Game.spawns.Spawn1.createCreep( [WORK, CARRY, MOVE], 'Harvester' + ++hc, { role: 'harvester' } );
else if (Game.spawns.Spawn1.room.find(FIND_MY_CREEPS, { filter: function(creep){ return creep.memory.role == 'upgrade'; }}).length < 3)
Game.spawns.Spawn1.createCreep( [WORK, CARRY, MOVE], 'Upgrade' + ++uc, { role: 'upgrade' } );
else if (Game.spawns.Spawn1.room.find(FIND_MY_CREEPS, { filter: function(creep){ return creep.memory.role == 'harvester'; }}).length < 6 &&
Game.spawns.Spawn1.room.find(FIND_MY_CREEPS, { filter: function(creep){ return creep.memory.role == 'upgrade'; }}).length >= 3)
Game.spawns.Spawn1.createCreep( [WORK, CARRY, MOVE], 'Harvester' + ++hc, { role: 'harvester' } );
else if (Game.spawns.Spawn1.room.find(FIND_MY_CREEPS, { filter: function(creep){ return creep.memory.role == 'builder'; }}).length > 1)
Game.spawns.Spawn1.createCreep( [WORK, WORK, CARRY, MOVE], 'Builder' + ++bc, {role: 'builder'} );
}
Still trudging through - i have to admit im really enjoying this process....