how i can use ListVersionsAsync and GetVersionAsync in my script ?
hmm so that will not make any issues ? i see that if a combined them in one key that may cause issues , this is what i exactly save :- {Coins , PotionStorage , GunParts , UsingGunParts , Gears , UsedGears , Potions , i may add more in the future because the game still under development} i think this might be a lot ?
Save them all into one key. You only need this if a playerâs data is corrupted, which is very unlikelyâŚ
- List the versions
local pages = DataStore:ListVersionsAsync(keyYouUseToLoadData, Enum.SortDirection.Descending)
- Get the last version
local page = pages:GetCurrentPage()
local entry = page[2] --last entry to the store
- Retrieve the version
local data = DataStore:GetVersionAsync(keyYouUseToSaveData, entry.Version)
- Check for corruption and use appropriately
Note: you will need pcalls
for the data store methods.
1 Like
what about the queue getting stuck ?
dont bother queueing backup data requests the same way you shouldnt bother queueing data get requests. Only queue write requests.
1 Like
i thought that may the auto save loop in each player and in the same time player joins the game , the load function run at the time with the auto save
It could do, if you donât already, put in a detection system for when data finishes loading, like an attribute or something. Only save if data has loaded.
1 Like
it is now working , thank you so much for your continuous help i really appreciate it
1 Like