WoWInterface - View Single Post - Add realm region info to the group info tooltips in the group finder
View Single Post
09-29-16, 09:33 PM   #14
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Ah, I think I know what the problem is. In order to figure out what region you're playing in, LibRealmInfo needs to look at your character's GUID, which isn't available before the login process is finished. Try wrapping the code up like this:

local f = CreateFrame("Frame")
f:SetScript("OnEvent", function()
     -- all the other code here
This will delay running the rest of the code until the login process is complete.

Re: The message spam, I forgot about that... the library is designed to be embedded in the addon using it, so if it's installed as a standalone addon, it assumes you're a developer and want debugging info. The simplest way to fix that is to move the LibRealmInfo.lua file from the LibRealmInfo folder into your addon's folder, then add a line reading "LibRealmInfo.lua" in your addon's TOC file, just before the line that names your addon's Lua file. Then you can delete the LibRealmInfo addon folder.
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!
  Reply With Quote