Thanks everyone, you folks are awesome!
For others interested the final working command is:
script.on_event(defines.events.on_tick, function(event)
if event.tick % 60*5 == 0 then
game.write_file("iron-plate.txt", game.forces.player.item_production_statistics.get_output_count("iron-plate ...
Search found 4 matches
- Wed May 06, 2020 11:07 pm
- Forum: Modding help
- Topic: Crash when writing to file via loop or control.lua
- Replies: 9
- Views: 3172
- Wed May 06, 2020 4:39 pm
- Forum: Modding help
- Topic: Crash when writing to file via loop or control.lua
- Replies: 9
- Views: 3172
Re: Crash when writing to file via loop or control.lua
Thanks quyxkh,
I revisited this option last night (I did see it show up in various posts previously) but no matter where I put it before, in or around the function I just end up with syntax errors or "unexpected symbol near')'" errors.
I think the closest I came resulted in a new crash with this ...
I revisited this option last night (I did see it show up in various posts previously) but no matter where I put it before, in or around the function I just end up with syntax errors or "unexpected symbol near')'" errors.
I think the closest I came resulted in a new crash with this ...
- Tue May 05, 2020 9:27 pm
- Forum: Modding help
- Topic: Crash when writing to file via loop or control.lua
- Replies: 9
- Views: 3172
Crash when writing to file via loop or control.lua
Greetings, I am exporting values to text files and I got stuck on consumption numbers...
If I enter this command into the console I will get a text file in my script-output dir with the correct number of iron plates consumed:
/c game.write_file("iron-plate.txt" , game.player.force.item_production ...
If I enter this command into the console I will get a text file in my script-output dir with the correct number of iron plates consumed:
/c game.write_file("iron-plate.txt" , game.player.force.item_production ...
- Fri Jan 25, 2019 7:24 pm
- Forum: News
- Topic: Friday Facts #279 - Train GUI & Modern Spitter
- Replies: 208
- Views: 100906
Re: Friday Facts #279 - Train GUI & Modern Spitter
Awesome update. 2 things I would love to see:
a) Please allow the map in the train GUI to operate the same as the regular map (specifically show the train station names and allow panning with click drag).
b) Please allow searching of a train station by name (either in the train GUI or the ...
a) Please allow the map in the train GUI to operate the same as the regular map (specifically show the train station names and allow panning with click drag).
b) Please allow searching of a train station by name (either in the train GUI or the ...