tomas7777
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 840 |
|
|
| 16 Jul 2016 07:16 PM |
| I'm trying to save an empty table in DataStore so that it's not nil in a game with 2 places. But for some reason it's not working, and theres not even any output. I have even tried doing that in the command bar in the Developer Console. |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 16 Jul 2016 07:42 PM |
We need to figure out the problem here. You haven't posted any code, so it's going to be hard.
1) Try writing a table that is not full and checking if you can see it.
2) Check for the nil value in your script when getting the data.
Do 1 at a time, and we will see where we are after that. |
|
|
| Report Abuse |
|
|
tomas7777
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 840 |
|
|
| 17 Jul 2016 06:58 AM |
DataStore = game:GetService("DataStoreService"):GetDataStore("ranks") DataStore:SetAsync("bans", {})
print(DataStore:UpdateAsync("bans", function(oldValue) local newValue = oldValue or 0 end))
Both entered in Command Bar with Studio API access on. I think that would print something other than nil. I also tried this: atable = {} DataStore:SetAsync("bans", atable)
I tested this in an empty place:
tablex = {} print(tablex)
It printed something like "table" and a bunch of numbers and letters, but sure that is normal. |
|
|
| Report Abuse |
|
|