Well, then let's talk about what you're trying to accomplish.
Are you looking for something like this?
Lua Code:
...
elseif event == "MAIL_INBOX_UPDATE" then
if Accountant_DetectAhMail() then
Accountant_Mode = "AH"
end
...
Lua Code:
function Accountant_DetectAhMail()
local numItems, totalItems = GetInboxNumItems()
for x = 1, totalItems do
local invoiceType = GetInboxInvoiceInfo(x)
if invoiceType == "seller" then
return true
end
end
end