From 6cb0cb7d7fe73c6ac2995b35ca602982f7fedcb1 Mon Sep 17 00:00:00 2001 From: ackis Date: Tue, 14 Jul 2009 20:42:58 +0000 Subject: [PATCH] Fix nil error. --- ARLDatamine.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ARLDatamine.lua b/ARLDatamine.lua index 605f905..7e18985 100644 --- a/ARLDatamine.lua +++ b/ARLDatamine.lua @@ -1008,19 +1008,19 @@ function addon:ScanVendor() local name,_,_,_,numAvailable = GetMerchantItemInfo(i) if (name) then ---self:Print(name) +self:Print(name) -- Lets scan recipes only on vendors - local matchtext = strlower(strmatch(name,"%a+: ")) + local matchtext = strmatch(name,"%a+: ") -- Check to see if we're dealing with a recipe - if (RECIPE_NAMES[matchtext]) then ---self:Print("isarecipe") + if (matchtext) and (RECIPE_NAMES[strlower(matchtext)]) then +self:Print("isarecipe") -- Get rid of the first part of the item local recipename = gsub(name,"%a+\: ","") -- Find out what spell ID we're using local spellid = reverse_lookup[recipename] -- Do the scan if we have the spell ID if (spellid) then ---self:Print("spellfound") +self:Print("spellfound") added = true tinsert(t,addon:TooltipScanRecipe(spellid,false,true)) -- Ok now we know it's a vendor,lets check the database to see if the vendor is listed as an acquire method. -- 1.7.9.5