game.write_file() not working?
Posted: Fri Jul 12, 2024 7:45 pm
I tried to write the simplest test possible for this, but I can't get it to work. I just want to write something to a file. I checked the `script-output` folder (I'm on MacOS) but it stays empty. I thought it might be some issues with permission, but the `/screenshot` command from the console actually saves those in the same folder.
control.lua:
documentation I used as reference: https://lua-api.factorio.com/latest/cla ... rite_file
control.lua:
Code: Select all
script.on_init(function()
game.print("Testing file write")
game.write_file("minimal_test_log.txt", "File writing test\n", true, 0)
end)