Hi!
I’m not using the oldValue parameter, I just don’t need it for my game, should I still use UpdateAsync over SetAsync with just a function that returns the value?
Thanks.
Hi!
I’m not using the oldValue parameter, I just don’t need it for my game, should I still use UpdateAsync over SetAsync with just a function that returns the value?
Thanks.
If you’re not using it you might as well use :SetAsync
since you’re using :UpdateAsync
to force a value regardless of the current one.
Isn’t UpdateAsnyc still safer?
Roblox says: “Since this function validates the data, it should be used in favor of SetAsync()
when there’s a chance that more than one server can edit the same data at the same time.” or do they just mean the parameter?
Edit: I’m not sure if this is the reason for that, but since I’m using UpdateAsync, it doesn’t give me that “added to queue” save-warning.
If you’re not using the oldValue
parameter use GlobalDataStore:SetAsync
.
The parameter in the transform function exists to be used to potentially prevent data loss, just calling the function per se without knowledge of what else it does encompasses misusage.