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?
|