From bf97f9e8352695e278f9dd7a307dba3f183f665e Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 23 Oct 2012 03:08:52 +0000 Subject: [PATCH] Add a warning when compiling the script if the spell ID is unknown. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@616 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCompile.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OvaleCompile.lua b/OvaleCompile.lua index dc18ec6..764dd85 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -184,11 +184,15 @@ local function ParseFunction(prefix, func, params) local spellId = paramList[1] if spellId and not OvaleData.spellList[spellId] then local spellName = GetSpellInfo(spellId) - if spellName == GetSpellInfo(spellName) then - --Ovale:Print("Learning spell "..spellName.." with ID "..spellId) - OvaleData.spellList[spellId] = spellName + if spellName then + if spellName == GetSpellInfo(spellName) then + Ovale:debugPrint("missing_spells", "Learning spell "..tostring(spellName).." with ID "..spellId) + OvaleData.spellList[spellId] = spellName + else + unknownSpellNodes[newNode.nodeId] = spellId + end else - unknownSpellNodes[newNode.nodeId] = spellId + Ovale:Print("Unknown spell with ID "..spellId) end end end -- 1.7.9.5