aboutsummaryrefslogtreecommitdiff
path: root/serialize.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-01-02 20:57:45 +0100
committerorwell96 <orwell@bleipb.de>2021-01-12 13:31:03 +0100
commit8ffdd8c293b84ffcf91c457a8accbd3e979eb38e (patch)
tree875380b0b9236b689cabb85fca108c20c2d14d1d /serialize.lua
parent19b399a01e451cd3f386bc8353f2d6d902c00d15 (diff)
downloadadvtrains-8ffdd8c293b84ffcf91c457a8accbd3e979eb38e.tar.gz
advtrains-8ffdd8c293b84ffcf91c457a8accbd3e979eb38e.tar.bz2
advtrains-8ffdd8c293b84ffcf91c457a8accbd3e979eb38e.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.lua')
-rw-r--r--serialize.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize.lua b/serialize.lua
index 436bf18..a525e9e 100644
--- a/serialize.lua
+++ b/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