narc0tiq / YARM

Yet another variant of the Resource Monitor for Factorio
https://mods.factorio.com/mod/YARM
MIT License
54 stars 41 forks source link

Error Autosave / Save #172

Open Storm-Reaver opened 3 hours ago

Storm-Reaver commented 3 hours ago

Map cannot be saved: The mod YARM - Resource Monitor (0.11.0) caused an error that cannot be fixed. Please inform the author of the mod about this error.

Error while running event YARM::on_save() Cannot serialise lua functions

The error always occurs during autosave, normal saving and loading works but no autosave is created

ridesdragons: for me it's the other way around - autosaves seem to be functioning, but I can't manually save

fkarg commented 3 hours ago

Well, it's on autosave for us (server, hosted by me). Manual saving works fine, some of the time.

The mod YARM - Resource Monitor (0.11.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event YARM::on_save()
Cannot serialise lua functions
Gerkiz commented 1 hour ago

The iterator is saved to the storage table, which is not ideal: storage.ore_tracker.iterator_func 👎

Located here: https://github.com/narc0tiq/YARM/blob/4eda629eb250bc3a807bdfbfebdda34b164c1d6a/libs/ore_tracker.lua#L152

wchristian commented 3 minutes ago

The iterator is saved to the storage table, which is not ideal: storage.ore_tracker.iterator_func 👎

Located here:

https://github.com/narc0tiq/YARM/blob/4eda629eb250bc3a807bdfbfebdda34b164c1d6a/libs/ore_tracker.lua#L152

What's a better place to store it?