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 » Scripters
Home Search
 

Re: Datastore request limit

Previous Thread :: Next Thread 
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
02 Jun 2015 02:25 PM
Hi guys
In my game I'm going to let players create a "name" - this will be saved to a datastore.
I then want to populate a scrolling list with all the names in one big list.
However I have a problem - this would need to load more than the Datastore request limit so it would not work.
Is there anyway I can get round this problem?
Thanks
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
02 Jun 2015 02:47 PM
Make a dictionary with all of the player's custom names and userIds and save it to the Global Data Store.
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
02 Jun 2015 02:48 PM
Then get it by doing this:

globalDS:GetAsync("customnames")[userId]
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
02 Jun 2015 03:00 PM
Saving every player's names to the same key will quickly reach the data limit XD


I script -~ chimmihc
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
02 Jun 2015 03:00 PM
xD So is there anyway around it?
Report Abuse
EncodedLua is not online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
02 Jun 2015 03:04 PM
WEll, you just put it in a dictionary and then save the dictionary.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
02 Jun 2015 03:06 PM
Tables are stored in JSON XD

The data limit will be reached quickly if more than 200 ish people play and they all make plenty of names.


I script -~ chimmihc
Report Abuse
jjwood1600 is not online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
03 Jun 2015 02:37 AM
XD so it is not possible to do? ;(
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
03 Jun 2015 02:46 AM
lol

Save a separate table for each player with their names in it.


I script -~ chimmihc
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
03 Jun 2015 05:43 AM
Make set intervals to save for everyone.
Even if they go offline or whatever you can still save this dictionary.
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Jun 2015 08:54 AM
one or two things.

1. use a dictionary and player keys and their custom names as value, and just save that dictionary, every once in a while, not player-individual, that way you control exactly how much times per minute a request is made.

2. use a table with string manipulation to join player and custom names, this one is harder to do and should only be used if you need to iterate over it AND the table may contain more than just the player's names. this too will allow you to control exactly how much times per minute a request is made.

here, i will make parts of an example of the table solution.

namestbl = {}

name = game.Players[plr].Name

customname = "CUSTOMNAME"

tblstr = name..":"..customname -- if player is ohno1112 and his name is "Sumthin", this joing the string together to be "ohno1112:Sumthin"

table.insert(namestbl,tblstr)

---submitting to datastore
game:GetService("DataStoreService"):GetDataStore("CustomNames"):SetAsync("a',namestbl)

--reading from datastore and extracting customnames:

a = game:GetService("DataStoreService"):GetDataStore("CustomNames"):GetAsync("a")

for i,v in pairs(a) do
if game.Players:FindFirstChild(string.sub(1,string.find(v,":")-1,)) then
customname = string.sub(string.find(v,":")+1,#v)
--Do stuff with the customname here.
end
end




Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Jun 2015 08:55 AM
if you still dont get it just please PM me and i can help you set things up.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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