Incorrect memory path, Can anyone help me?



  • I'm newer here, and.... Just Test RawMemory.set('test'), then all my creeps stop working, and I just get

    7:50:28 PM][shard1] if (_.isUndefined(globals.Memory.rooms) || globals.Memory.rooms === 'undefined') { ^ TypeError: Cannot read property 'rooms' of null at Object.module.exports.loop (main:28:17) at __mainLoop:1:52 at sigintHandlersWrap (vm.js:32:31) at sigintHandlersWrap (vm.js:73:12)

    even I respawn, it still appears......



  • @wjx123xxx If you use RawMemory then you can not use Memory anymore. It's in the docs. Those are the same memory mapped differently, if you use RawMemory then the memory is nor automatically converted (parsed) to objects.



  • You've corrupted your memory by setting it to the raw string "test", which the engine can't handle properly. In order to resolve the issue, you'll have to reset your Memory:

    1. If your code is throwing errors, make sure to disable it, by adding a return; to the start of your loop or switch to an empty branch.
    2. Type RawMemory.set('{}'); into console.

    If this didn't solve the issue let me know.

    I suggest to stay away from RawMemory until you've fully understood how it works, there are a lot of other things that are far more important when starting.



  • Thank you for your RIGHT ANSWER!!!

    The Step 1 is necessary, without disable the exception by a return, I can never recover from the mistake

    Thank you a lot!!