Thread Tools Display Modes
12-24-10, 12:40 AM   #1
khurzog
A Frostmaul Preserver
 
khurzog's Avatar
Join Date: Dec 2007
Posts: 266
whats wrong with this kgpanels script

hi. need some quick help to fix a small annoyance

i am using kgpanels to make a chat window only show up when in party/raid. that works fine

Code:
local pmems = GetNumPartyMembers()
 if pmems < 1 then
    ChatFrame5:Hide()
 else
    ChatFrame5:Show()
 end
problem is, every time i relog, the chat window will be empty and i have to manually check the settings again (party chat/raid chat/bg chat)

so how can i maintain the windows settings? thanks!
  Reply With Quote
12-27-10, 01:13 AM   #2
harrellj
A Flamescale Wyrmkin
Join Date: Jul 2009
Posts: 132
personally, I have a very different script that seems to work well for me

in onload:

Code:
self:RegisterEvent('PLAYER_ENTERING_WORLD')
self:Hide()
ChatFrame4:Hide()
in onevent:

Code:
if event == "PLAYER_ENTERING_WORLD" then
   local isInstance, _ = IsInInstance()
   if isInstance == 1 then
     self:Show()
     ChatFrame4:Show()
     ChatFrame4Tab:Show()
   else
     self:Hide()
     ChatFrame4:Hide()
     ChatFrame4Tab:Hide()
   end
end
Of course, you'd change it to chatframe5 in your case.
  Reply With Quote
12-27-10, 06:32 PM   #3
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
You have to register the events in order for the script to work.
__________________
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » whats wrong with this kgpanels script

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