WoW:API CalendarEventInvite: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API CalendarEventInvite to API CalendarEventInvite without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
:''nil''
:''nil''


== Details ==
== Notes ==
: This call can NOT be made within an Event editing session (ie between the New() and Add() calls or between Open() and Update() calls)
You can't do invites while another calendar action is pending.
: This way the AddEvent will not happen
Register to the event "CALENDAR_ACTION_PENDING" and using that, check with the [[API_CalendarCanSendInvite|CalendarCanSendInvite]] function if you can invite.
<code>
function MyCreateEvent()
  CalendarNewEvent() -- Create a new Event
  CalendarEventSetDescription( "description" )
  CalendarEventSetTitle ("title")
  CalendarEventSetDate( 1,11,2008)
  CalendarEventSetTime( 20,00)
  CalendarEventInvite( player )
  CalendarAddEvent() -- This will not happen
end
</code>
: This call can also NOT be made after an Event creation
: This way the Event is created, but no other player is invited
<code>
function MyCreateEvent()
  CalendarNewEvent() -- Create a new Event
  CalendarEventSetDescription( "description" )
  CalendarEventSetTitle ("title")
  CalendarEventSetDate( 1,11,2008)
  CalendarEventSetTime( 20,00)
  CalendarAddEvent() -- Saves the event
  CalendarEventInvite( player ) -- No player is invited
end
</code>
 
: How and when this call is to be used remains a question.


Inviting a player who is already on the invitation list will result in a "<Player> has already been invited." dialog box appearing.
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[edit]

Arguments[edit]

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

Returns[edit]

nil

Notes[edit]

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.