uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 04:21 PM |
If I had a table of say, 7 values saved in a data store I call it with GetAsync in a variable as seen below
t = ds:GetAsync("user_" .. newPlayer.userId .. "_" .. g[i].Name)
Then if I did like t[1] Would that count for a single of the requests allowed per minute? Then if I did t[2] Would that count for a second of the requests allowed per minute? Or would t[1] t[2] t[3] t[4] All only count as a single of the GetAsync requests allowed per minute? Extremely crucial for my game's save script, if you can provide any insight, it would be very appreciated.
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 04:30 PM |
b1
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 04:39 PM |
b2 I really need to know how the request limits for something like this works. My entire game relies on it, tbh.
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 04:51 PM |
b3 10 views no replies pls halp
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 18 Jul 2015 04:59 PM |
| You only made one request on the OP. |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 18 Jul 2015 05:04 PM |
| It's one per type of call. You get about 80 GetAsync, plus about 80 SetAsync per minute. It isn't possible to exceed the limit. If you're making calls at a rate, in real time, on pace to exceed the limit, your requests are made to hold, so as to throttle them back to a pace under the limit. |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 05:08 PM |
So even though it's like t = ds:GetAsync("user_" .. newPlayer.userId .. "_" .. g[i].Name) t[1] t[2] t[3] t[4] t[5]
It only counts as GetAsync being called once? And under that assumption, because data store values can have some 64k characters, I could possibly have hundreds of t[#'s] With it only calling the GetAsync once?
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 05:14 PM |
http://wiki.roblox.com/index.php?title=Data_store
Every time you call the get or set method you use one request. Once you have called it, accessing t just grabs the values from memory. Saying t[1] will access the value you got when you used the get method the first time. To get more recent data you would need to call the get function again. |
|
|
| Report Abuse |
|
|
uglypoe
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 4382 |
|
|
| 18 Jul 2015 05:15 PM |
Awesome, thank you! That's perfect for my game If I can compress several hundred values into a single value, I can hold several hundred pokemon stats in a single value and have larger servers without it caching. Thanks!!!
The Ugliest Poe on LMaD ( ͡° ͜ʖ ͡°) // 27,880 RAP // R$11,912 |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 18 Jul 2015 05:18 PM |
| Yes, but don't know an easy way to get the size of a table, so I just use strings. If you know you're no where close, just use table, but, like for example, I actually have a system where I have to cut the data into chunks that are just under the size limit in order to save it all. I can't imagine doing that with tables. If you know an easy way to get the size of a table, I wouldn't mind hearing about it. |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 05:26 PM |
| You can use JSON encoding to turn a table into a string. Once you have the string, you can chop it up however you want to make it fit within the datastore limits! |
|
|
| Report Abuse |
|
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
|
| 18 Jul 2015 05:29 PM |
| Ah, yes, of course, then I can do string.len. Thanks! |
|
|
| Report Abuse |
|
|