Left hand assignment error



  • Hi, I want to include some methods at the top of my main file,

    however, one include always seems to go wrong. The statusUpdate include

    always yields left hand assignment error.

     

    Code:

    var roleHarvester = require('role.harvester');
    var roleUpgrader = require('role.upgrader');
    var roleBuilder = require('role.builder');
    var roleSoldier = require('role.soldier');
    var roleRanged = require('role.ranged');
    var roleHealer = require('role.healer');
    var roleScout = require('role.scout');
    var roleTower = require('role.tower');
    var deleteMemory = require('delete.memory');
    var statusUpdate = require('status.update');
    var spawnCreeps = require('spawn.creeps');


  • Culture

    The syntax error will be in that file. Look into that specific file to fix the message.



  • Thanks for the reply,

    but in the file I dont think i use any assignments.

    Code here:

     

    var statusUpdate = {

    run: function(harvesters, superharvesters, upgraders, superupgraders, builders, superbuilders, soldiers, supersoldiers, rangeds, superrangeds, healers, superhealers, scouts, superscouts) {
    for(var name in Game.rooms) {
    console.log('Harvesters: ' + harvesters.length + ' Upgraders: ' + upgraders.length + ' Builders: ' + builders.length + ' Soldiers: ' + soldiers.length + ' Rangeds: ' + rangeds.length + ' Healers: ' + healers.length + ' Scouts: ' + scouts.length);
    console.log('SHarvesters: ' + superharvesters.length + ' SUpgraders: ' + superupgraders.length + ' SBuilders: ' + superbuilders.length + ' SSoldiers: ' + supersoldiers.length = ' SRangeds: ' + superrageds.length + ' SHealers: ' + superhealers.length + ' SScouts: ' + superscouts.length);
    console.log(' Room '+name+' has '+Game.rooms[name].energyAvailable+' energy');
    console.log('');
    }
    }
    };

    module.exports = statusUpdate;


  • Culture

    supersoldiers.length = ' SRangeds: ' +



  • o wow, thanks


  • Culture

    No problemo! Good luck! 😃


  • Banned

    Hey this thread just helped me out! I accidentally used = instead of == right before bed and woke up with no creeps lol. Thanks!