From 12fb90f9d310b8bb912e0f1f4fda60821dcce0ec Mon Sep 17 00:00:00 2001 From: Flameshadowxeroshin Date: Sun, 28 Aug 2011 16:55:58 +0000 Subject: [PATCH] be safer. --- Themes/_fallback/Scripts/04 Scoring.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Themes/_fallback/Scripts/04 Scoring.lua b/Themes/_fallback/Scripts/04 Scoring.lua index 8cc2e39cd1..95d2f21666 100644 --- a/Themes/_fallback/Scripts/04 Scoring.lua +++ b/Themes/_fallback/Scripts/04 Scoring.lua @@ -321,6 +321,6 @@ for v in ivalues(DisabledScoringModes) do r[v] = nil end Scoring = {} setmetatable(Scoring, { __index = function(...) return function(params,pss) --put any code here that should run before every scoring function -if not GAMESTATE:IsHumanPlayer(params.Player) and r[key] -then return r[key](...) end + if not GAMESTATE:IsHumanPlayer(params.Player) and type(r[key]) == "function" then + return r[key](...) end end }