#Problem with data store Versioning System On Roblox

1 messages · Page 1 of 1 (latest)

dense rivet
#

LOGS : See Image
**Expected Behaviour : ** new version after evey setASync
Problem : Added a lot of SeyASync Calls with diff values and it only made two

yo , in docs setasync makes new version every time it`s called

why my code not doing that ||("ignore the pcalls everywhere i have been trying for over half an hour now )||

local DataStoreService = game:GetService("DataStoreService")

local PlayerData = DataStoreService:GetDataStore("PlayerExperienceV2")

local PlayerID = "925"

local Part = workspace["Press_Me_Data"]
local Viewer = workspace.Show_Data

local Debounce = false

local State,VersionSaved = pcall(PlayerData.SetAsync,PlayerData,PlayerID,"POTATO")
if not  State then
    warn("NO SET REQUEST ?>!")
    return
end




--print("VERSION S : " ,VersionSaved , "Current Value ",pcall(function()
    
--    return PlayerData:GetAsync(PlayerID)
--end))


local state1,Keys = pcall(PlayerData.ListKeysAsync,PlayerData,nil,0,nil,false)
local state2,Versions = pcall(PlayerData.ListVersionsAsync,PlayerData,PlayerID,Enum.SortDirection.Ascending,nil,nil,500)



if not state1 or not state2 then
    warn("BRUH SOMTHING Went Wrong")
end


--for i,v:DataStoreKey in Keys:GetCurrentPage() do
--    print("Key :" ,v.KeyName)
--end


for i,v:DataStoreObjectVersionInfo in Versions:GetCurrentPage() do
    local Value = PlayerData:GetVersionAsync(PlayerID,v.Version)
    
    print(v.CreatedTime,v.Version,"Current Value : ",Value)
    print("V Equals : ",v.Version == VersionSaved)

end



hexed widget
# dense rivet LOGS : See Image **Expected Behaviour : ** new version after evey setASync Pro...

This may be the issue
https://devforum.roblox.com/t/upcoming-changes-to-data-stores-versioning/3042258

Only one version will be saved per hour for each key.

dense rivet
#

why on earth, they don`t update their docs this is super dumb