|
| 29 May 2017 09:15 PM |
a 100% fullproof stat saving script that saves your things even when the game shuts down and DOESNT break
|
|
|
| Report Abuse |
|
|
|
| 29 May 2017 09:23 PM |
| What do you mean by "things"? |
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 29 May 2017 09:33 PM |
If you shutdown the game, then you can't save any unsaved data.
|
|
|
| Report Abuse |
|
|
PriceBoys
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 298 |
|
|
| 29 May 2017 09:36 PM |
| 253 people are playing your game O_o |
|
|
| Report Abuse |
|
|
|
| 29 May 2017 10:52 PM |
so playerleaving wont work if i shut down the game?
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 29 May 2017 11:08 PM |
One way you COULD work around this though
Save every time a stat changes, so a server shutdown wouldn't matter |
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 29 May 2017 11:09 PM |
What are the stats you are saving? Give us a list
|
|
|
| Report Abuse |
|
|
| |
|
fret13103
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 881 |
|
|
| 30 May 2017 01:02 AM |
| Give the list so we actually know if we want to help you or not, and can at least think about how we would tackle the task. |
|
|
| Report Abuse |
|
|
spinywind
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 3580 |
|
|
| 30 May 2017 02:15 AM |
Ill make it how much?
#Code for i,v in pairs do repeat end. |
|
|
| Report Abuse |
|
|
OhSoMoody
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 139 |
|
|
| 30 May 2017 02:22 AM |
I faced a similar problem to yours, and solved it by:
1) Use Data Store (of course) 2) Inside the Data Store server script, store all values in an array. 3) Client sends any data changes to the array...NOT directly to the Data Store!! 4) The server script will send any array data changes (and ONLY the changes...IF any) to the Data Store...every 15 seconds. Even if the user leaves, the array is already updated. The server will do the saving for you.
|
|
|
| Report Abuse |
|
|
OhSoMoody
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 139 |
|
|
| 30 May 2017 02:25 AM |
In addition to my previous post, that method is also very light on using your Data Store network quota. Even though you save every 15 seconds for all users...because you use an array (with isDirty flags), you will not always write. Only if needed...
I am using this successfully in my game now (below). Works like a charm!!
https://www.roblox.com/games/736427405/Hide-and-Seek-Hyperloop |
|
|
| Report Abuse |
|
|
|
| 30 May 2017 02:28 AM |
IntValue.Changed:connect(function() --save end) |
|
|
| Report Abuse |
|
|
OhSoMoody
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 139 |
|
|
| 30 May 2017 02:34 AM |
| You can't save all the time for every change...it will blow your Data Store network quota. You need to cache on the server, and write to Data Store from there. |
|
|
| Report Abuse |
|
|
|
| 30 May 2017 04:24 AM |
"Client sends any data changes to the array"
No.
|
|
|
| Report Abuse |
|
|
OhSoMoody
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 139 |
|
|
| 30 May 2017 05:34 AM |
| Please elaborate. It works perfectly for me. |
|
|
| Report Abuse |
|
|
| |
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
| |
|
| |
|
OhSoMoody
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 139 |
|
|
| 30 May 2017 06:19 AM |
| Dont trust the client? Its the client who sends player data changes as well. With FE enabled and proper client/server architecture, this is perfectly proper. |
|
|
| Report Abuse |
|
|