Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 28 Oct 2016 08:20 PM |
Im making a game that involves a single global table that is editable and saveable in game by anyone, however, with multiple servers there exists a problem of overwriting tables. One server could undo everything from another servers tables saves when saving and vise versa.
To prevent this, Im trying to only allow one server at a time, so I need to know how roblox can understand when another server already exists so that it can shut itself down if another server does exist already.
Anyone have any ideas to solve my predicament? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 28 Oct 2016 08:35 PM |
'single global table that is editable and saveable in game by anyone'
Can you explain a bit more?
|
|
|
| Report Abuse |
|
|
|
| 28 Oct 2016 08:35 PM |
You could use DataStore's. For instance you can have a datastore with a value and every time a server starts it will add 1 to the value, Then you check what that value is, If its 1 then a server already exist (Shutdown Server)
|
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 29 Oct 2016 10:01 PM |
Oh datastores exist outside of servers?
I thought that datastore stuff saves when the server shuts down.
Thanks! |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2016 10:06 PM |
Yes, Datastores persist even when the game is not running
|
|
|
| Report Abuse |
|
|