WoW:API CalendarEventInvite: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: {{wowapi}} :Add's a player to the currently opened event. CalendarEventInvite("player") == Parameters == === Arguments === :("player") :;player : String - The name of the player to be...)
 
m (Move page script moved page API CalendarEventInvite to WoW:API CalendarEventInvite without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 14: Line 14:
:''nil''
:''nil''


== Details ==
== Notes ==
: Appearently, this function seems NOT to work within an addon. The following code, does not result in a proper invite:
You can't do invites while another calendar action is pending.
<code>
Register to the event "CALENDAR_ACTION_PENDING" and using that, check with the [[API_CalendarCanSendInvite|CalendarCanSendInvite]] function if you can invite.
function MyCreateEvent()
  CalendarNewEvent() -- Create a new Event
  CalendarEventSetDescription( "description" )
  CalendarEventSetTitle ("title")
  CalendarEventSetDate( 1,11,2008)
  CalendarEventSetTime( 20,00)
  CalendarAddEvent() -- Save the Event
  CalendarEventInvite( player )  -- < This does not work
end
</code>


Inviting a player who is already on the invitation list will result in a "<Player> has already been invited." dialog box appearing.
----
----
__NOTOC__
__NOTOC__

Latest revision as of 04:45, 15 August 2023

WoW API < CalendarEventInvite

Add's a player to the currently opened event.
CalendarEventInvite("player")

Parameters

Arguments

("player")
player
String - The name of the player to be invited to the event

Returns

nil

Notes

You can't do invites while another calendar action is pending. Register to the event "CALENDAR_ACTION_PENDING" and using that, check with the CalendarCanSendInvite function if you can invite.

Inviting a player who is already on the invitation list will result in a "<Player> has already been invited." dialog box appearing.