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: The most reliable DP method?

Previous Thread :: Next Thread 
loleris is online. loleris
Joined: 23 Feb 2009
Total Posts: 1610
20 Aug 2013 01:52 PM
I used everything.
Last time I was suggested to only save data when the player is leaving.
That's what I use currently.

It seems it breaks less, but it still does ._.

HELP ME
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 01:53 PM
Save when the changes happen.
Saving when the player is leaving us unreliable.
Report Abuse
loleris is online. loleris
Joined: 23 Feb 2009
Total Posts: 1610
20 Aug 2013 01:53 PM
I saved when changes happened. It broke more often for me.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 01:58 PM
How does it break?
Never breaks for me.
Report Abuse
loleris is online. loleris
Joined: 23 Feb 2009
Total Posts: 1610
20 Aug 2013 01:59 PM
When you return to the game you load empty data. And start it all over again.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Aug 2013 02:00 PM
Well then:

You are doing it wrong.
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
20 Aug 2013 02:01 PM
^
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 02:02 PM
^
Report Abuse
loleris is online. loleris
Joined: 23 Feb 2009
Total Posts: 1610
20 Aug 2013 02:14 PM
@Notunknown99

Omg thanks! That's all I need to know! It works now!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Aug 2013 02:15 PM
Glad to be able to help, despite having virtually no useful information!
Report Abuse
loleris is online. loleris
Joined: 23 Feb 2009
Total Posts: 1610
20 Aug 2013 02:32 PM
No no, I did everything that you have told me to!
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 02:36 PM
http://www.roblox.com/Data-Persistence-Simulator-updated-item?id=115939577
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
20 Aug 2013 02:44 PM
"I saved when changes happened. It broke more often for me."

That probably means that your saving code is subtly wrong, and calling it more often is causing the cases where it breaks to come up more often.

When a player leaves the server commits DP changes to the database. That means if you save on leave there's a race between your script and the server, you trying to save your stuff out before the server commits changes, and if the server wins your changes will not be saved.

You _have_ to save as changes happen as a result. There is no other correct way to do it.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Aug 2013 02:52 PM
...Maybe we need a method for saving, like Player:SaveData()?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Aug 2013 02:52 PM
Or maybe Player:SetSaveReady()? (I guess it could also wait 5 seconds before saving, in case this is not used)
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
20 Aug 2013 03:17 PM
@Notunknown99: Player:SaveData() is already in the API. However, it's unusable by scripts due to the fact that it may cause more requests to be made than would be optimal.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
20 Aug 2013 03:44 PM
LOL U IDIETS I NEVER HAD A PROBLEM WITH DATA PERSITANTS

HAHAHA UR DOING IT WRONG


(No, really. I haven't. And I'm using the "unreliable" method of saving when the player leaves.)
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
20 Aug 2013 03:44 PM
Yeah, there's no way such behavior would be exposed, because it would spam the database with updates.

Case and point: You just asked for it exactly so that you can use your current code without many changes and spam the database with updates as a result.
Report Abuse
As8D is online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
20 Aug 2013 03:50 PM
mhm.

Also, for his problem about not having control over how he saves his stuff or whatever, I recommend making a fun system that works like DP, except it'll work offline too.

I've made one... that I seem to change some times... and use in different test games to... yeah, test it out 'with DP on' (ok, that was a lie, DP is off in solo mode, but we can make stuff behave as if it was on)

^ Oh yeah, and you can make it so it actually makes DP easier for you (you don't have to worry about :WaitForDataReady, as that's called when someone enters without having their DP loaded, yay!... in my case, that is) >_>

- As, just when did I fall into slumber? Seems like a week or so. Prob. a month.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 03:52 PM
As8D, I linked yours.
Report Abuse
flipflop8421 is not online. flipflop8421
Joined: 15 Aug 2011
Total Posts: 51
20 Aug 2013 04:11 PM
Roblox would be so much better if you could save DP to the game as well as Players. Eg. game:SaveString("AllServersChat", "flipflop8421: Cookies")
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
20 Aug 2013 04:19 PM
^ In the works.
Report Abuse
As8D is online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
20 Aug 2013 04:20 PM
Hah, ok Boh.

Hrm, flip, yes, per-server DP has been backed up by a lot of players. The example could be something more logical though >_>


- As, Informationsteknologi. Uhu.
Report Abuse
abaw7 is not online. abaw7
Joined: 23 Oct 2009
Total Posts: 745
20 Aug 2013 04:26 PM
Like, a top-10 leader board.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Aug 2013 04:27 PM
By SaveData I was thinking more something that can ONLY be used after a player has disconnected.
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