From 348b11bdcbc1112e4a5c1b134d18fb2b3b8b1388 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 15 Nov 2013 19:56:23 +0000 Subject: [PATCH] Undefined functions called in scripts are now always errors. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1167 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCompile.lua | 5 +---- OvaleOptions.lua | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/OvaleCompile.lua b/OvaleCompile.lua index 7df6cfa..f69160e 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -56,7 +56,6 @@ local self_compileOnStances = false local OVALE_COMPILE_DEBUG = "compile" local OVALE_MISSING_SPELL_DEBUG = "missing_spells" -local OVALE_UNKNOWN_FUNCTION_DEBUG = "unknown_function" local OVALE_UNKNOWN_SPELL_DEBUG = "unknown_spells" -- Parameters used as conditionals in script declarations. @@ -814,11 +813,9 @@ local function CompileScript(text) end -- Verify that all the functions called within the script are defined. - -- Not an error if a function is undefined (might be unreachable code), but complain - -- at run-time during compilation. for p, v in pairs(self_functionCalls) do if not (OVALE_FUNCTIONS[p] or self_customFunctions[p] or OvaleCondition:IsCondition(p)) then - Ovale:DebugPrintf(OVALE_UNKNOWN_FUNCTION_DEBUG, "Unknown function call: %s (node%s)", p, v.nodeId) + Ovale:Errorf("Unknown function call: %s (node%s)", p, v.nodeId) end end diff --git a/OvaleOptions.lua b/OvaleOptions.lua index a6ce701..adfb8ea 100644 --- a/OvaleOptions.lua +++ b/OvaleOptions.lua @@ -533,12 +533,6 @@ local self_options = desc = L["Debug stat snapshots"], type = "toggle", }, - unknown_function = - { - name = "Unknown functions", - desc = L["Debug unknown functions"], - type = "toggle", - }, unknown_spells = { name = "Unknown spells", -- 1.7.9.5