RequestData||doc136347

September 20, 2022

Format

RankDataStore:RequestData(key, callback)

Describe

Asynchronously request the value on the key corresponding to the leaderboard data, pass the value in and execute the callback function.

parameter

Variable name Type Describe
key string key

Callback Arguments

Type Describe
variant Data value

Code example

Obtain the combat effectiveness data of a player from the "player combat effectiveness" ranking data.

local playerPowerData = Engine.DataService:GetRankDataStore("PlayerPower")
playerPowerData:RequestData("Player_A", function(power)
    print("Player_A power:", power)
end)