aboutsummaryrefslogtreecommitdiff
path: root/serialize_lib/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-04-04 19:57:43 +0200
committerorwell96 <orwell@bleipb.de>2021-04-04 19:58:25 +0200
commit5ee8c0e39b6dffc5437e1b48b08cfbeb6ea414d1 (patch)
treec147099e46780125442232b18ca7396aa7a13059 /serialize_lib/init.lua
parent3dc6426e861b7c7e7fa14ab82d62a7d818ea0d2e (diff)
parentedcc0d09178bfb64fbaa7620a7b0176d9b57b9d1 (diff)
downloadadvtrains-5ee8c0e39b6dffc5437e1b48b08cfbeb6ea414d1.tar.gz
advtrains-5ee8c0e39b6dffc5437e1b48b08cfbeb6ea414d1.tar.bz2
advtrains-5ee8c0e39b6dffc5437e1b48b08cfbeb6ea414d1.zip
Update serialize_lib
Diffstat (limited to 'serialize_lib/init.lua')
-rw-r--r--serialize_lib/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/serialize_lib/init.lua b/serialize_lib/init.lua
index 20ffa4d..afc6884 100644
--- a/serialize_lib/init.lua
+++ b/serialize_lib/init.lua
@@ -57,6 +57,7 @@ function serialize_lib.read_table_from_file(filename)
local succ, ret = pcall(ser.read_from_file, filename)
if not succ then
serialize_lib.log_error(ret)
+ return false,ret
end
return ret
end
@@ -67,8 +68,9 @@ function serialize_lib.write_table_to_file(root_table, filename)
local succ, ret = pcall(ser.write_to_file, root_table, filename)
if not succ then
serialize_lib.log_error(ret)
+ return false,ret
end
- return ret
+ return true
end