From 58a1ee819b6a5c623562fe800758ca564be60048 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 17 Apr 2014 11:59:41 +1000 Subject: Catch properties file errors, except for when the file doesn't exist. --- ClientHamr/GuiLua/skang.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index 3e9314f..3ddc692 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua @@ -345,10 +345,12 @@ end -- Restore the environment, and grab paramateres from standard places. moduleEnd = function (module) -- See if there is a properties file, and run it in the modules environment. - local properties = loadfile(module._NAME .. '.properties') + local properties, err = loadfile(module._NAME .. '.properties') if properties then setfenv(properties, getfenv(2)) properties() + elseif 'cannot open ' ~= string.sub(err, 1, 12) then + print("ERROR - " .. err) end pullArguments(module) -- cgit v1.1