What did you do?I'm making a mod which currently just write something into factorio's log file. My mode is already activated, so I run the game and load any save with some automated trains (I attach the one I use for the screenshot).
In background I look factorio's logs and I se my strings ("Hello world") into the logs. Still in background I edit with Notepadd++ the control.lua file to comment the 4th line (the hello world one's) and update it into the zip archive which contains my mod (the path "C:\Users\MyHome\AppData\Roaming\Factorio\mods\RaphikiTrain_0.16.0.zip"), the game is still running well.
I reload the savegame and I got the following error :
I close the game, re-run it, re-open the same savegame and I got no error. Into news logs I see that my "Hello world" is well comment, so it should be not a syntax error...80.493 Error AppManagerStates.cpp:1304: Opening file __RaphikiTrain__/control.lua failed -- error code -102
What did you expect to happen instead? It might be obvious to you, but do it anyway!I expect my control.lua file to be reopened since Factorio API's documentation tells that (see from http://lua-api.factorio.com/latest/Data-Lifecycle.html) :
4. control.lua initialization
During this stage each mod's control.lua is loaded and executed in their own Lua instance that will be owned by that mod for the remainder of the play session. Each mod has its own Lua instance and own global table to store data. Because this is run every time a save file is created or loaded you don't need to restart the game to see changes made to the control.lua file. Simply restarting or reloading a save will re-run this stage.
During this stage access to the global table is not available. The script table and the remote table are however available. Note, although the global table has not been setup if a mod does populate the table with some data it will be overwritten by any loaded data.
At the end of this stage (if loading a save file) mod data saved in the map file is loaded and the global table for each mod is restored.
- The mod :
- Logs with the error :
- Logs when I reload the game :
- The save :