3

I created a script in Simulation mode which runs great. Then when I want to execute it in survival mode it doesn't work anymore. It seems to have problems with the Memory hash in survival mode.

1
  • It looks like the Memory hash is indeed not reset in survival mode. Any suggestions how to reset?
    – Sjoerd
    Commented Feb 21, 2015 at 21:50

1 Answer 1

1

I haven't tested this, since I've been too busy to fiddle with Screeps since before Survival launched, but you should be able to initialize your memory on the first tick.

As in, create a module that explicitly sets every memory object you use to blank, then in your main loop, call that module if Game.time == 1.

1
  • Game.time in survival mode does not start at 0.
    – Sjoerd
    Commented Mar 28, 2015 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .