From 5d77d8475af7aff27eb026a4b56065387c024165 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 4 Nov 2017 22:42:24 -0400 Subject: Massive changes * New error messages for missing dependencies * Removed useless art_serverchanger entity * Added a sweet ascii logo * Added Skills * Minor fixes to cl_inventory tracker * Changed a few prints to use logging module --- gamemode/core/mapstich/cl_mapstich.lua | 9 +++++++-- gamemode/core/mapstich/sv_mapstich.lua | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'gamemode/core/mapstich') diff --git a/gamemode/core/mapstich/cl_mapstich.lua b/gamemode/core/mapstich/cl_mapstich.lua index 62cad3f..6f85eeb 100644 --- a/gamemode/core/mapstich/cl_mapstich.lua +++ b/gamemode/core/mapstich/cl_mapstich.lua @@ -1,9 +1,14 @@ --[[ The client constantly cheks to see if we're in a serverchnage zone ]] -nrequire("sh_zones.lua") +if not nrequire("sh_zones.lua") then return end hook.Add("Think","artery_checklevelchange",function() - local z = LocalPlayer():GetCurrentZone() + local z + pcall(function() + z = LocalPlayer():GetCurrentZone() + end,function() + --This happens ocasionally when the player has loaded, and is running lua, but the LocalPlayer() entity isn't valid yet. + end) --print("looks like i'm in zone",z) if z then net.Start("art_zonechange") diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua index 0a20828..91b4ec2 100644 --- a/gamemode/core/mapstich/sv_mapstich.lua +++ b/gamemode/core/mapstich/sv_mapstich.lua @@ -1,6 +1,6 @@ --Make sure zones are loaded already nrequire("sv_mysqlite.lua") -nrequire("sh_zones.lua") +if not nrequire("sh_zones.lua") then return end local q = nrequire("core/database/sv_queries.lua") --if not zones then error("This thing needs zones to function!") end -- cgit v1.2.3-70-g09d2