Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 01 Nov 2015 01:35 PM |
Right now I do:
PlayerAdded -Load -SetAsync every 60 secs
PlayerRemoving -SetAsync
But, sometimes there is data loss. Should I be using UpdateAsync? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 01:41 PM |
The server might shut down before data is saved.
game.OnClose = function() repeat wait() until everyone's data is saved end
http://wiki.roblox.com/index.php?title=API:Class/DataModel/OnClose
This is not a solution, just something that might be causing the problem. |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
| |
|
|
| 01 Nov 2015 02:25 PM |
Well your code is probably the problem here then. I'd say look over it again or remake the whole thing from scratch. Or give us the code and someone here may find the issue.
I never had problems with data loss using setasync or getasync. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 02:27 PM |
| 30 seconds is the max limit for game.OnClose, are you waiting <= 30 seconds? |
|
|
| Report Abuse |
|
|