Quantcast WoWInterface - View Single Post - Best way to determine who killed me
View Single Post
11-27-12, 03:43 AM   #9
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,603
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, oUF_Phanx, 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 03:46 AM.
  Reply With Quote