quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
|
| 13 Sep 2014 03:56 PM |
did i save the table bd{} wright ?if so, i am having trouble getting the whole table.i only get the first value 140470381.how would i use GetAsync to print the table bd{}?
local DataStore = game:GetService("DataStoreService") local savebadgeIds = DataStore:GetOrderedDataStore("savebadgeIds")
game.Players.PlayerAdded:connect(function(newPlayer) local id = newPlayer.userId local saveb =savebadgeIds:GetAsync(id) bd={140470381,128696531,128518891,140374781} for k, val in pairs(bd) do saveb={} saveb=(val) savebadgeIds:SetAsync(id,saveb) print(id,saveb ) -------------this prints the table correctly end end end) |
|
|
| Report Abuse |
|
|
quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
|
| 13 Sep 2014 04:53 PM |
| how do you save tables{} to OrderedDataStore,i am not sure if its right because i can only get the first value in the table to print when i call GetAsync |
|
|
| Report Abuse |
|
|
quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
| |
|
|
| 13 Sep 2014 06:05 PM |
| OrderedDataStores are for number values rather than for tables. |
|
|
| Report Abuse |
|
|
quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
|
| 13 Sep 2014 06:15 PM |
| so you can't use OrderedDataStore for tables . i should use datastore for tables regardless if it is a table of numbers? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2014 06:16 PM |
| As long as the table style is consistent, then yes, save your table onto a regular DataStore. |
|
|
| Report Abuse |
|
|
quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
| |
|
quickeye
|
  |
| Joined: 10 Jun 2012 |
| Total Posts: 192 |
|
|
| 13 Sep 2014 06:31 PM |
| i saved it datestore i have the same problem |
|
|
| Report Abuse |
|
|