Why game stop executing first part of my script?



  •  

     

     

     

    I have a script, where in the begining, i use "require" to execute script, where i am collecting data about room and storeing it into memory, and after that, i am reading data from memory, and sending commands to my creeps.

    Every time, after data collected, i print it in Console, like:

    [10:27:32 AM]############# E33S48 ##############
    [10:27:32 AM]#Sorces|----|----|----|----
    [10:27:32 AM]# 2
    [10:27:32 AM]#Harvesters|Haulers|Builders|Upgraders|
    [10:27:32 AM]# 1 of 1 |2 of 2 | 0 of 0 | 6 of 6 |
    [10:27:32 AM]#Need to summon: none|
    [10:27:32 AM]#Summoning: none
    [10:27:32 AM]============>END of getData: 1.21435 CPU Used

    But, after 5-6 iteractions, data in console print stop refreshing => game stop collecting data and storing it in to memory => So when game sending commands to creeps, it use not actual data in memory 😞

    how to fix it?

     

     

     

     

     

     

     

     



  • fixed. just added call of getData function inside main loop 🙂