mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-26 09:13:55 +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")
|
||||
awards.save()
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user