Thread Tools Display Modes
09-02-10, 12:50 PM   #1
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Post find Cata changes...

Hi all. with updating one of my addons i got this error.
for Cata

Code:
Interface\AddOns\ctest\ctest.lua:126: bad argument #1 to 'find' (string expected, got nil)
Count: 1

Call Stack:
[C]: ?
[C]: in function `find'
Interface\AddOns\ctest\ctest.lua:126: in function <Interface\AddOns\ctest\ctest.lua:125>

Code:
Uinotice = true

if Uinotice2 then
local c2not = CreateFrame("Frame")
c2not:RegisterEvent("CHAT_MSG_CHANNEL")
c2not:SetScript("OnEvent", function()
		if string.find(arg1, "A buyer has been found for your auction of .+%.") then
			UIErrorsFrame:AddMessage(arg1, 1.0, 1.0, 0.0, 1.0, UIERRORS_HOLD_TIME)
		end
end)
end
thanks for your time.
  Reply With Quote
09-02-10, 12:54 PM   #2
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
The global variable "arg1" as well as the rest have been nuked. You'll need to extract the data from "..." or assign it directly within the function call.

Examples:
Code:
myFunction(self, ...)
    arg1, arg2, arg3 = ...
Code:
myFunction(self, event, arg1, arg2)
  Reply With Quote
09-02-10, 01:14 PM   #3
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Post

Thanks/ it seems to be working now

Last edited by weasoug : 09-02-10 at 02:05 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » find Cata changes...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off