I've written a command and it works but sadly it stops working if I save and then load the map.
Could those commands be saved as well in the savefile?
script.on_event(defines.events.on_chunk_generated, function(event)
--[[stuff]]
end)
[0.16.XX] console commands not saved
Re: [0.16.XX] console commands not saved
Thanks for the report,
Unfortunately due to the way script registrations work, we are not currently able (or willing) to make them persist through save and load
Unfortunately due to the way script registrations work, we are not currently able (or willing) to make them persist through save and load
- TruePikachu
- Filter Inserter
- Posts: 978
- Joined: Sat Apr 09, 2016 8:39 pm
- Contact:
Re: [0.16.XX] console commands not saved
If you need it to keep working, add it to the `control.lua` file in the savegame itself, with proper guards so it only gets invoked during init.