mirror of
https://github.com/glua/wsdl.git
synced 2025-03-04 03:13:11 -05:00
fix error when wsdl_cache.txt is empty or corrupt.
This commit is contained in:
parent
4662814b28
commit
77cddfb753
@ -60,7 +60,8 @@ if !game.SinglePlayer() then
|
||||
local filecache
|
||||
if file.Exists("wsdl_cache.txt", "DATA") then
|
||||
filecache = util.JSONToTable(file.Read("wsdl_cache.txt","DATA"))
|
||||
if filecache.csum == csum then
|
||||
if filecache == nil then filecache = {} end
|
||||
if filecache.csum and filecache.csum == csum then
|
||||
download_count = #filecache.sendaddons
|
||||
for _,id in ipairs(filecache.sendaddons) do
|
||||
resource.AddWorkshop(id)
|
||||
|
Loading…
Reference in New Issue
Block a user