Quantcast
Simple Chat msg for guild recruiting. - WoWInterface
Thread Tools Display Modes
11-29-21, 11:59 PM   #1
Nova320
A Kobold Labourer
Join Date: Nov 2021
Posts: 1
Simple Chat msg for guild recruiting.

Trying to send chat message through addon when I am only and only every 20 min
code:
local flag = 1
sleep(60)
While 1 do
hour,minute = GetGameTime();
if flag == 1 or hour >= phrs+1 or minute >= pmin+11 then
SendChatMessage("Looking to do High-level keys or trying to form a raid team? Looking for help with keys? Then we are your guild", "CHANNEL", nil,2);
RunMacro("Guild");
phrs, pmin = hour, minute
flag = 2
end
end

But this does not work. Can anyone help?
  Reply With Quote
11-30-21, 05:05 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 587
sleep isn't a valid function.

SendChatMessage is hardware protected when using the CHANNEL option, which means code cannot call it unless a keystroke or mouse click was used to execute the code. In the case of delayed repetitive code manually entered in chat or in a macro, the first time is the hardware execution, each delayed execution after that is not.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Simple Chat msg for guild recruiting.

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