View Single Post
06-20-10, 09:31 PM   #8
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Soulofsin_007 View Post
1.
Code:
Events = CreateFrame("Frame")
Events:SetScript("OnEvent", function(self, event, ...)
     if event == "PLAYER_ENTERING_WORLD" then
         print("Hello"...UnitName("player"))
     end
end)
Events:RegisterEvent("PLAYER_ENTERING_WORLD")
My head just exploded because you created those frames in the global namespace instead of locally.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote