View Single Post
04-19-14, 05:14 AM   #19
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Originally Posted by cokedrivers View Post
Understandable, I'll remove the greeting message.

Coke
You don't need to remove the message entirely, unless you want to go that route. When the AddOn is loaded (login or reloadUI) check a new saved variable. Call it BasicUI.message_seen or something. Do not put a default value; leave that blank.

Then do an if/then during ADDON_LOADED (or OnInitialize for Ace3 AddOns). OnInit only fires once, and you would do the following check after you have set up or validated your saved variables.
Code:
if BasicUI.message_seen then
    break -- don't print the load message. break instead of return to exit the if/then but not the whole function
else
    BasicUI.message_seen = true
    -- print your welcome message
end

Last edited by myrroddin : 04-19-14 at 05:17 AM. Reason: code correction
  Reply With Quote