diff options
author | orwell96 <orwell@bleipb.de> | 2021-01-02 20:57:45 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-01-12 13:31:03 +0100 |
commit | 0ba5874b4f5f1a7565df8bfd20c91c309647429a (patch) | |
tree | 1193759e5e4c24fc238cdf18a0f0b55613acb325 /serialize_lib | |
parent | 9d12c72499fae08639f6628047a57cbb2cd837a7 (diff) | |
download | advtrains-0ba5874b4f5f1a7565df8bfd20c91c309647429a.tar.gz advtrains-0ba5874b4f5f1a7565df8bfd20c91c309647429a.tar.bz2 advtrains-0ba5874b4f5f1a7565df8bfd20c91c309647429a.zip |
Some more serializer fixes (backported from new_lzb):
- Move DUMP_DEBUG_SAVE block before the actual saving so it can be used to trace serializer errors
- Don't crash on functions in data, ignore them silently
- Increase the save interval
Diffstat (limited to 'serialize_lib')
-rw-r--r-- | serialize_lib/serialize.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize_lib/serialize.lua b/serialize_lib/serialize.lua index 436bf18..a525e9e 100644 --- a/serialize_lib/serialize.lua +++ b/serialize_lib/serialize.lua @@ -88,8 +88,8 @@ function value_to_string(t) elseif type(t)=="string" then return "S"..escape_chars(t) else - file:close() - error("Can not serialize '"..type(t).."' type!") + --error("Can not serialize '"..type(t).."' type!") + return "S<function>" end return str end |