WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   error more then 60 upvalues (https://www.wowinterface.com/forums/showthread.php?t=33145)

Chimaine 06-14-10 09:44 AM

Quote:

Originally Posted by Grimsin (Post 192084)
you mean the Party1 arg's? its just like on the event ADDON_LOADED the name of your addon becomes an arg... all the unit events except the unit args.

i have the onscript handler and everything seems to be working fine but the events dont seem to be registering...

Honestly I vaven't ever heared of that. It's not documented and a quick test shows me, that it doesn't work. Unless you have replaced the :RegisterEvent() func by some other, which I don't belive.

Grimsin 06-14-10 09:46 AM

yea i did that... if i put GUIPartyFrame. infront of it it says its not a global... if i remove it i load bug free but the events are not actually registerd

Chimaine 06-14-10 09:58 AM

Quote:

Originally Posted by Grimsin (Post 192091)
yea i did that... if i put GUIPartyFrame. infront of it it says its not a global... if i remove it i load bug free but the events are not actually registerd

Perhaps you have a problem with your scope then.

Where do you try to do that? Because GUIPartyFrame is only visible in createPartyEventFrame() in your code snipplet.
Also, the returned value of createPartyEventFrame() seems to go nowhere.

Grimsin 06-14-10 10:02 AM

how would i make the GUIPartyFrame vis everywhere? because im trying to use those functions inside of another function...

Chimaine 06-14-10 10:03 AM

Perhaps you should go back to some of the basics ;)

http://www.wowwiki.com/Lua_variable_scoping

Xrystal 06-14-10 01:31 PM

Quote:

Originally Posted by Grimsin (Post 192095)
how would i make the GUIPartyFrame vis everywhere? because im trying to use those functions inside of another function...

Apart from Chimaine's suggestion .. the route I use allows it to work across the whole addon.


local addonName, addonData = ...

addonData.GUIPartyFrame = CreateFrame(...)
etc


Then all files in the TOC after this file with that first line added at the top of each file will have access to that variable.


All times are GMT -6. The time now is 10:03 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI