|
| 29 Mar 2017 08:11 PM |
| If your grabbing data and the GetAsync function fails for some reason. Should I check it with a pcall and try it over again lets say 15 times? |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Mar 2017 08:12 PM |
^ "try it over again lets say 15 times" That's why |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:15 PM |
| I am giving out scenario, and I realized that might be a bit much. But you get the point like wait a few seconds and try again? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:16 PM |
The reason he's even calling pcall is probably because he's not handling the data correctly.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:16 PM |
"wait a few seconds and try again"
I still don't understand why that would be necessary. Data store data is not bound to players in any way.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:18 PM |
I am doing things correctly. This is just special case scenario if something goes wrong.
Was wondering if other developers did anything similar? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:20 PM |
| I am coming from this with the view point that you should handle the pcall success if it is false. And not just let it slide and get/set no data right? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:21 PM |
Oh...
No, I don't think you need to have these types of error handlers in your scripts. If something genuinely goes wrong then it's probably something that spontaneously happened with the data store server. Backing up data is never a bad idea.
|
|
|
| Report Abuse |
|
|
| |
|
triode
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 5844 |
|
|
| 29 Mar 2017 08:22 PM |
GetAsync doesn't "fail"
The only reason a request to grab data from the store would "fail" is if you did something wrong or ROBLOX messed up. And if the data were to somehow magically "fail" to return from the server, then saving would likely be the same story so nothing gets hurt.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 08:58 PM |
TBH I'd just use PlayerDataStore because it does it all for you and caches if it fails >.>
Papa bless |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 09:07 PM |
Didn't know PlayerDataStore was a thing...
Here I am using old fashion data store :P |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 09:09 PM |
It's not, I have absolutely no idea what he's talking about. Just keep doing what you're doing.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Mar 2017 02:45 PM |
Yes it is... wiki.roblox.com/index.php?title=PlayerDataStore_module
Also used by Merely and alexnewtron, among other developers.
Papa bless |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2017 02:46 PM |
That's not an actual ROBLOX class. OP is obviously doing just fine without it.
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2017 02:48 PM |
^ I know, but it helps with large amounts of requests. Seemed like what was causing the data store to error for him.
Papa bless |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2017 02:49 PM |
Nothing errored for him. Did you read the thread?
|
|
|
| Report Abuse |
|
|
|
| 30 Mar 2017 02:56 PM |
Oh, I misunderstood. I thought he was calling a data store over and over again, causing the data to fail. My mistake.
Papa bless |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2017 02:57 PM |
Yeah that's what I originally thought. It was worded pretty weirdly.
|
|
|
| Report Abuse |
|
|