BNGetGameAccountInfo() returning nil
This is a weakaura which has been working fine till recently.
So did a test had a friend whisper me thru bnet. The IDAccount comes back 132. BNGetFriendInfoByID(132) returns nil rest blows up So do I need change something or did blizzard break something? Code:
function(Event, ...) |
Quote:
PS: You shouldn't run select(1,...) ever. You're telling it to return the list of arguments as-is starting from position 1 (the beginning). This accomplishes nothing and wastes CPU on a global lookup and a function call. The following code does exactly the same without any of the overhead. Code:
Msg = ... |
So the error is happening cause of something blizzard is doing then?
|
From what's posted, you have a missing arg in your function parameter list. Without it, the entire list is shifted over by one.
For example, it should be function(self, event, ...) not function(event, ...). |
Quote:
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. |
Well if I change Event, to a different parm, then its not going to be the actual event every time.
So not sure how I can fix. Its up to weakauras how it calls the function |
This code is working fine now
Thanks for the help |
All times are GMT -6. The time now is 03:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI