Does anyone have a template or example of how to properly handle Global Updates? I’m slightly confused about the different states Active, Locked, and Cleared.
When the player loads their profile by joining, is that when I should call :LockActiveUpdate() and lock their data for the entire time they’re in the game? If I do this, do I have to do anything about it when they leave?
I’m using ProfileService to store a list of Arrest records a player has, I’m trying to figure out the best way to remove arrest records of a player who is not in the game, or is active on another server.
Okay so basically with GlobalUpdate you send the update so its “Active”. When players receive that update you should lock it then handle it so give coins or whatever and when you don’t need it anymore clear it.
Regardless of what you think he can add or do, coding improves over time. You can always improve your code and you should. No one should just stop and say “This is the best ggwp nothing is better.” I mean we all know that someone with 30 years of coding experience, they are still working to improve code. I just said that so you can understand that coding is not a you reached a certain point you are good, its a constant skill you must work on.
I would use SDM for new projects, ProfileService doesn’t look like it’s being maintained anymore (no updates for the last 3 years), and SDM is easier to use + better.
There is only slightly more things to write, but this module includes session locking. Something that should exist in the Built-in DatastoreService but isn’t.
Heh yeah in all honesty I’d rather wait for Roblox to implement native session locking than having to tinker with ProfileService any more than I have to because that’s all it does - provide session locking and periodic saving. It’s been almost 4 years… But maybe! Just maybe Roblox can do it!
It seems like when a player gets disconnected, their profile gets “stuck” in the dead session, and when they join a new session, it says their profile is already loaded in that new session… Which makes no sense.
Using “Steal” does not appear to really fix this either.