Thread Tools Display Modes
05-06-11, 02:50 AM   #1
frohanss
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 40
Delay part of code

I am making a simple addon to display Arena rating as Text on screen with a tooltip that shows detail info.

The addon works nicely. But on login it generates a error on the part where i set the text to display due to addon loading before it have gotten arena team information. A normal /rl does not trigger any errors.

Is there anyway i can add a delay to text so it doesn't generate errors?

Code:
local Text  = LBottom:CreateFontString(nil, "OVERLAY")
Text:SetText("Sometext")
  Reply With Quote
05-06-11, 03:25 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Wait for the startup-events like PLAYER_ENTERING_WORLD

http://www.wowpedia.org/Handling_events#Lua-specific
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Delay part of code

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off