Difference between revisions of "FBInstant.context.createAsync"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2018.3<br/> === Description === <br /> Attempts to create or switch into a context between a specified player and the current player....")
 
Line 6: Line 6:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
= FBInstant.context.createAsync(idcallback,)
+
FBInstant.context.createAsync(id,callback)
 
</source>
 
</source>
'''id:''' (string) ID of the player. ''''''<br/>
+
'''id''': (string) ID of the player. ''''''<br/>
'''callback:''' (function) A function that will be called with two arguments: true when the game has switched into the new context or nil if the operation failed, and an error code if the function failed. ''''''<br/>
+
'''callback''': (function) A function that will be called with two arguments: true when the game has switched into the new context or nil if the operation failed, and an error code if the function failed. ''''''<br/>

Revision as of 11:20, 23 August 2018

Available since: Gideros 2018.3

Description


Attempts to create or switch into a context between a specified player and the current player. The returned promise will reject if the player listed is not a Connected Player of the current player or if the player does not provide permission to enter the new context. Otherwise, the promise will resolve when the game has switched into the new context.

 FBInstant.context.createAsync(id,callback)

'id: (string) ID of the player. '
'callback: (function) A function that will be called with two arguments: true when the game has switched into the new context or nil if the operation failed, and an error code if the function failed. '