aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/pac/sv_pac.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
commit9e0537b0aa417e88a6a61238484ddcef74080ae0 (patch)
treee2bd590ec3de41d384aa5f6206b14e1a73647846 /gamemode/core/pac/sv_pac.lua
parent191ba416c8b611ea4901cead138789a357c56134 (diff)
downloadartery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.gz
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.bz2
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.zip
Added tons of stuff
Diffstat (limited to 'gamemode/core/pac/sv_pac.lua')
-rw-r--r--gamemode/core/pac/sv_pac.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/gamemode/core/pac/sv_pac.lua b/gamemode/core/pac/sv_pac.lua
index 3c5c6be..482dea6 100644
--- a/gamemode/core/pac/sv_pac.lua
+++ b/gamemode/core/pac/sv_pac.lua
@@ -108,12 +108,16 @@ local function cacheload(key)
--If it's already in the cache, just update the time it was last used and return the pac.
if pac_cache[key] ~= nil then
pac_cache[key].time = CurTime()
+ if pac_cache[key].pac == nil then
+ PrintTable(pac_cache)
+ error("Pac was loaded, but the txt was nil!")
+ end
return pac_cache[key].pac
end
--Otherwise, we need to load it.
local pacpath = string.format("artery/pacs/%s.txt",key)
- local pacfile = file.Read(pacpath,"LUA")
+ local pacfile = file.Read(pacpath,"DATA")
--If we haven't reached max cache yet, just put it in
if pacs_in_cache < max_pacs_in_cache then