Hazzatr0m
|
  |
| Joined: 13 Dec 2014 |
| Total Posts: 1069 |
|
|
| 16 Jun 2017 02:01 PM |
Hey.
I wanted to make a method with a DataStore which I could save all the player's developer product purchases and at a later data administrators could see a log filled with all the recent purchases and data about each one - so I used an OrderedDataStore.
The only problem is that I need to save a table with it and OrderedDataStores does not allow that. I've tried to save it as a string by turning it into JSON, but it still denies it and tells me I can't save strings.
Does anyone know a way around this?
ME ME BIG BOY! |
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 16 Jun 2017 02:02 PM |
OrderedDataStores are not what you want. You can only save ints so it's for things like leaderboards.
|
|
|
| Report Abuse |
|
|
Hazzatr0m
|
  |
| Joined: 13 Dec 2014 |
| Total Posts: 1069 |
|
|
| 16 Jun 2017 02:04 PM |
I need some sort of function which I can get all - or at least a half dozen of the values in a DataStore. From my research so far, it only seems like I can do this via OrderedDataStore.
ME ME BIG BOY! |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2017 02:11 PM |
| For ordereddatastore, make the key the tick() that they bought the game pass, and the return value can be an array of data |
|
|
| Report Abuse |
|
|
Hazzatr0m
|
  |
| Joined: 13 Dec 2014 |
| Total Posts: 1069 |
|
|
| 16 Jun 2017 02:14 PM |
@MidasTouched
Already tried this. It doesn't like the key's value anything other than an int, like said above.
ME ME BIG BOY! |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2017 02:16 PM |
| err a tick() is a number according to the wiki so idk |
|
|
| Report Abuse |
|
|
Hazzatr0m
|
  |
| Joined: 13 Dec 2014 |
| Total Posts: 1069 |
|
|
| 16 Jun 2017 02:20 PM |
Yes, that's correct. You're telling me to make the key tick() - which is valid. But then, you are telling me to make the value of the key an array - which is where the error is thrown.
ME ME BIG BOY! |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2017 02:27 PM |
| Set the key to the data and the tick to the value |
|
|
| Report Abuse |
|
|
Hazzatr0m
|
  |
| Joined: 13 Dec 2014 |
| Total Posts: 1069 |
|
|
| 16 Jun 2017 02:29 PM |
I had that idea, but later denied it because if the data was to go over 50 characters ROBLOX would freak
ME ME BIG BOY! |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2017 02:34 PM |
| Try it anyways, and test it to see what will happen. It could be that because the table is actually a reference to the table, it would only be the "hashcode" length number of letters. (Btw idk what the reference name is called in ROBLOX) |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2017 02:36 PM |
| If ROBLOX doesn't let you because of the limit, you could just store the players name as the key, and then in a normal data store have the players name as the key and the data as the value |
|
|
| Report Abuse |
|
|