generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: OrderedDataStore

Previous Thread :: Next Thread 
quickeye is not online. 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 is not online. 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 is not online. quickeye
Joined: 10 Jun 2012
Total Posts: 192
13 Sep 2014 05:57 PM
idk bump./
Report Abuse
IAmTheRolo is not online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
13 Sep 2014 06:05 PM
OrderedDataStores are for number values rather than for tables.
Report Abuse
quickeye is not online. 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
IAmTheRolo is not online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
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 is not online. quickeye
Joined: 10 Jun 2012
Total Posts: 192
13 Sep 2014 06:19 PM
ty let me try!
Report Abuse
quickeye is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image