From b3fae7fe6bdb3d893d7e8b67ceb444f9bf98d9d2 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Wed, 30 Dec 2009 21:01:28 +0100 Subject: [PATCH] Minor changes --- pError.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pError.lua b/pError.lua index b4173e3..2d82c22 100644 --- a/pError.lua +++ b/pError.lua @@ -9,7 +9,6 @@ --]] -local next = next local find, lower = string.find, string.lower local addon = CreateFrame('Frame', 'pError') @@ -22,28 +21,28 @@ local function slashCommand(str) elseif(str == 'list') then if(pErrorDB[1]) then print('|cffff8080pError:|r Listing database:') - for k, v in next, pErrorDB do + for k, v in pairs(pErrorDB) do print(' |cff95ff95', v, '|r') end else print('|cffff8080pError:|r Database is empty') end elseif(#str > 0) then - for k, v in next, pErrorDB do + for k, v in pairs(pErrorDB) do if(find(str, v)) then - tremove(pErrorDB, k) + table.remove(pErrorDB, k) return print('|cffff8080pError:|r Removed|cff95ff95', v, '|rfrom database') end end - tinsert(pErrorDB, str) + table.insert(pErrorDB, str) print('|cffff8080pError:|r Added|cff95ff95', str, '|rto database') end end local function errorEvent(self, event, str, ...) if(event == 'UI_ERROR_MESSAGE' and pErrorDB[1]) then - for k, v in next, pErrorDB do + for k, v in pairs(pErrorDB) do if(find(lower(str), v)) then return end -- 1.7.9.5