diff options
author | David Walter Seikel | 2014-04-17 11:59:41 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-17 11:59:41 +1000 |
commit | 58a1ee819b6a5c623562fe800758ca564be60048 (patch) | |
tree | 6fe15f3dba7e9ea8ed1f3a6909bb33b59dd40c2a /ClientHamr | |
parent | Actually get skin running to work. (diff) | |
download | SledjHamr-58a1ee819b6a5c623562fe800758ca564be60048.zip SledjHamr-58a1ee819b6a5c623562fe800758ca564be60048.tar.gz SledjHamr-58a1ee819b6a5c623562fe800758ca564be60048.tar.bz2 SledjHamr-58a1ee819b6a5c623562fe800758ca564be60048.tar.xz |
Catch properties file errors, except for when the file doesn't exist.
Diffstat (limited to 'ClientHamr')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 | |||
345 | -- Restore the environment, and grab paramateres from standard places. | 345 | -- Restore the environment, and grab paramateres from standard places. |
346 | moduleEnd = function (module) | 346 | moduleEnd = function (module) |
347 | -- See if there is a properties file, and run it in the modules environment. | 347 | -- See if there is a properties file, and run it in the modules environment. |
348 | local properties = loadfile(module._NAME .. '.properties') | 348 | local properties, err = loadfile(module._NAME .. '.properties') |
349 | if properties then | 349 | if properties then |
350 | setfenv(properties, getfenv(2)) | 350 | setfenv(properties, getfenv(2)) |
351 | properties() | 351 | properties() |
352 | elseif 'cannot open ' ~= string.sub(err, 1, 12) then | ||
353 | print("ERROR - " .. err) | ||
352 | end | 354 | end |
353 | 355 | ||
354 | pullArguments(module) | 356 | pullArguments(module) |