Originally Posted by galvin
So the error is happening cause of something blizzard is doing then?
|
The manner in which you pass the function you use to process the events affects what arguments you get passed during runtime.
widget:SetScript("OnEvent, function(self, event, ...) end) the
self would (in most cases) be same as widget, followed by the event that called the function, and a list of potential arguments.
In your code you mislabel it like
widget:SetScript("OnEvent, function(event, ...) end) thus you now use event thinking it's the event name, but it's actually the widget reference, and the arguments following when unpacked like
local arg1, arg2 = ... now actually set arg1 to be the event, then arg2 would be the first argument of that event.