WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   JoinChannelByName (https://www.wowinterface.com/forums/showthread.php?t=1401)

Lugh 07-30-05 07:23 AM

JoinChannelByName
 
Hello,
I started to code my 1st addon this morning. It should join a channel on game startup.

Test.lua looks like this:
function Test_OnLoad()
JoinChannelByName("Test");
ChatFrame_AddChannel(DEFAULT_CHAT_FRAME, "Test");
end

Now I have 2 problems:

1.) After startup there ist no channel test
2.) my other channels were move down by one. Means the common channel is no #2 the trade channel #3 and so on

How can I fix this ?

Lugh 07-31-05 12:17 AM

Ok, I found a work a round.

function Test_OnLoad()
Chronos.scheduleByName("JoinTest", 60, JoinTest);
end

function JoinTest()
JoinChannelByName("Test");
ChatFrame_AddChannel(DEFAULT_CHAT_FRAME, "Test");
end

But I can't believe that such an easy problem does need a dependency of Chronos :eek:


All times are GMT -6. The time now is 03:06 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI