View Single Post
Old 11-27-12, 02:43 AM   #9
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 3,976
Instead of ZONE_CHANGED, use PLAYER_ENTERING_WORLD. This will fire both when you first enter the world (no matter what kind of zone you're in) and whenever you pass through a loading screen.

Also (I might have mentioned this in one of your other threads) semicolons at the end of lines are not needed in Lua. They can technically avoid issues with ambiguous syntax, but I've been writing WoW addons in Lua for about 7 years now and have never even seen any code where a semicolon was needed to clarify the syntax, so unless you're dead-set on using them as a carry-over from some other programming language you're used to working with, I'd suggest leaving them out to reduce clutter in your code.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 11-27-12 at 02:46 AM.
Phanx is offline   Reply With Quote