if (''role' > 6)



  • if (harvesters < 6){
        Game.spawns.Spawn1.createCreep(bodyExtractor, null, {role: "harvester"})
    };
    
    
    if (harvester >= 2){
    if (guards < 4){
        Game.spawns.Spawn1.createCreep(guard, null, {role: "guard"})
        };
    
    if (builders < 3){
            Game.spawns.Spawn1.createCreep(builder, null, {role: "builder"})
            };
    
    if (medics < 2){
                Game.spawns.Spawn1.createCreep(medic, null, {role: "medic"})
            };
    };
    

    So far it gets up to exactly 2 harvesters, but then stops making anything at all despite having plenty of energy. My idea is that it should produce harvesters, after it reaches at least two then it could build guards as well (this is for the survival mode). It just doesn't build anything after 2 harvesters.



  • harvester vs harvesters (note the ending of the word)?



  • Thank you, I failed to catch that!