Difference between revisions of "FBInstant.player.getDataAsync"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 7: | Line 7: | ||
Retrieve data from the designated cloud storage of the current player.<br /> | Retrieve data from the designated cloud storage of the current player.<br /> | ||
<br /></translate> | <br /></translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.player.getDataAsync(keys,callback) | FBInstant.player.getDataAsync(keys,callback) | ||
</source> | </source> | ||
Line 15: | Line 15: | ||
=== <translate>Examples</translate> === | === <translate>Examples</translate> === | ||
'''Example'''<br/> | '''Example'''<br/> | ||
− | < | + | <syntaxhighlight lang="lua"> |
FBInstant.player.getDataAsync({"achievements","currentLife"}, function(result,error) | FBInstant.player.getDataAsync({"achievements","currentLife"}, function(result,error) | ||
if result then | if result then |
Revision as of 14:28, 13 July 2023
Available since: Gideros 2018.3
Class: Player
Description
Retrieve data from the designated cloud storage of the current player.
<syntaxhighlight lang="lua">
FBInstant.player.getDataAsync(keys,callback)
</source>
Parameters
keys: (table) An array of unique keys to retrieve data for.
callback: (function) A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed.
Examples
Example
<syntaxhighlight lang="lua">
FBInstant.player.getDataAsync({"achievements","currentLife"}, function(result,error)
if result then
for key,value in pairs(result) do
print(key,value)
end
end
end)
</source>
- FBInstant.player.canSubscribeBotAsync
- FBInstant.player.flushDataAsync
- FBInstant.player.getConnectedPlayersAsync
- FBInstant.player.getDataAsync
- FBInstant.player.getID
- FBInstant.player.getName
- FBInstant.player.getPhoto
- FBInstant.player.getSignedPlayerInfoAsync
- FBInstant.player.getStatsAsync
- FBInstant.player.incrementStatsAsync
- FBInstant.player.setDataAsync
- FBInstant.player.setStatsAsync
- FBInstant.player.subscribeBotAsync