Thread Tools Display Modes
11-23-08, 08:06 AM   #1
Guildenstern
A Defias Bandit
Join Date: Apr 2008
Posts: 2
Problems with creating event in Blizzard Calendar

Greetings.

I have following problem. I create event in the calendar using this code in my addon:

local dayButton = CalendarContextMenu.dayButton;
CalendarCloseEvent();
CalendarNewEvent();

local month, year, _, _ = CalendarGetMonth(dayButton.monthOffset);
CalendarEventSetDate(month, dayButton.day, year);
CalendarEventSetDescription("test raid");
CalendarEventSetTime(20, 0);
CalendarEventSetTitle("TEST " .. raidName);
CalendarEventSetType(CALENDAR_EVENTTYPE_RAID);

local texturesTable = {CalendarEventGetTextures(CALENDAR_EVENTTYPE_RAID)};
for i = 1, #texturesTable / 3 do
if texturesTable[(i-1)*3 + 1] == raidName then
CalendarEventSetTextureID(i);
break;
end
end
CalendarAddEvent();

And it works fine. But whenever I try to call CalendarEventInvite() before CalendarAddEvent() to invite some people, it just fails silently, and event doesn't get created. What am I doing wrong?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Problems with creating event in Blizzard Calendar


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