Type function Library gamecircle.* Return value None Revision Release 2025.3721 Keywords Highest, List, Whispersync
Add a value to a string set, which can include Metadata.
gamecircle.Whispersync.AddToStringSet(key, value) gamecircle.Whispersync.AddToStringSet(key, value, metadata)
String. The key used to access a specific string set.
String. The value to be added to the string set.
Metadata. A table of metadata to be stored with the string. It must be a lua table comprised only of string fields with string values in those fields. For examples and more information, check the documentation page for metadata.
local stringSetKey = "myFirstStringSet"
local gamecircle = require("plugin.gamecircle")
gamecircle.Init(false, false, true)
gamecircle.Whispersync.AddToStringSet("A")
gamecircle.Whispersync.AddToStringSet("B")
gamecircle.Whispersync.AddToStringSet("C")
gamecircle.Whispersync.AddToStringSet("D")
gamecircle.Whispersync.AddToStringSet("E")
print("Does the set contain F?: " .. gamecircle.Whispersync.StringSetContains(stringSetKey, "F"))
print("Here is what the string set does contain:")
local stringSet = gamecircle.Whispersync.GetStringSet(stringSetKey)
for i,entry in ipairs(stringSet) do
print("-" entry.value)
end
print("The extra for element A is:")
local entryA = gamecircle.Whispersync.GetStringSetValue("A")
print("-value: " .. entryA.value)
print("-isSet: " .. entryA.isSet)
print("-metadataPresent: " .. entryA.metadataPresent)
print("-timestamp: " .. entryA.timestamp)
local keys = gamecircle.Whispersync.GetHighNumberListKeys()
for i,key in ipairs(keys) do
print("-" .. key)
end