Difference between revisions of "FBInstant.player.flushDataAsync"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2018.3<br/> === Description === <br /> Immediately flushes any changes to the player data to the designated cloud storage. This functi...") |
|||
Line 6: | Line 6: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | FBInstant.player.flushDataAsync(callback) | |
</source> | </source> | ||
− | '''callback | + | '''callback''': (function) A function that will be called with two arguments: true when changes have been persisted successfully or nil if the operation failed, and an error code if the function failed. ''''''<br/> |
Revision as of 10:16, 23 August 2018
Available since: Gideros 2018.3
Description
Immediately flushes any changes to the player data to the designated cloud storage. This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate and known by the game. Non-critical changes should rely on the platform to persist them in the background. NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.
FBInstant.player.flushDataAsync(callback)
'callback: (function) A function that will be called with two arguments: true when changes have been persisted successfully or nil if the operation failed, and an error code if the function failed. '