gamecircle.Whispersync.GetLatestNumberKeys

Type function
Library gamecircle.*
Return value KeyTable
Revision Release 2022.3683
Keywords Latest, SyncableNumber, Whispersync

Overview

Returns the keys for all latest number stored under the current Whispersync GameData level. The return value is a KeyTable.

Syntax

local keys = gamecircle.Whispersync.GetLatestNumberKeys()

Examples

local latestNumKey = "myFirstLatestNumber" 
local gamecircle = require("plugin.gamecircle")  
gamecircle.Init(false, false, true)  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 10, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 1000, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 1, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 10000, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 100, "INT")  
print("The Latest Number is: " .. gamecircle.Whispersync.GetLatestNumber(latestNumKey, "INT").value)  
print("These are all the Latest Number values stored under the current GameData set of Whispersync.")  
local keys = gamecircle.Whispersync.GetLatestNumberKeys()  
for i,key in ipairs(keys) do  
    print("-" .. key)  
end