mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-29 18:53:44 +01:00
Fix error due to unchecked JSON parsing
This commit is contained in:
parent
9c74a3f85a
commit
6dc91cf893
@ -80,7 +80,8 @@ function awards.load()
|
|||||||
os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt")
|
os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt")
|
||||||
awards.save()
|
awards.save()
|
||||||
else
|
else
|
||||||
__player_data = minetest.parse_json(storage:get_string("player_data")) or {}
|
local json = storage:get("player_data")
|
||||||
|
__player_data = json and minetest.parse_json(json) or {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user