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: Weird, wiki needs to update this..

Previous Thread :: Next Thread 
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
16 Dec 2015 09:46 PM
It appears to be WaitForDataReady(), gives me an infinite loop where the player is never able to save in DP..

While I heard in datastore you can't save these kinds of variables.

local Stats = {Level = nil, DataCount = nil}

And if you can list a way how please show all the steps and detail... Because there are somethings in DS I don't understand.

Never tried to completely learnd DS
Report Abuse
0xBAADF00D is not online. 0xBAADF00D
Forum Moderator
Joined: 18 Nov 2015
Total Posts: 483
16 Dec 2015 09:50 PM
You should change to the new DataStore API. DataPersistence is old.
Report Abuse
0xBAADF00D is not online. 0xBAADF00D
Forum Moderator
Joined: 18 Nov 2015
Total Posts: 483
16 Dec 2015 09:51 PM
Oops, just read the rest of your post. There's no reason why you shouldn't be able to save something like that with DS, but keep in mind that setting something to nil in a table means Lua dumps out the key. Try setting it to false if you really need to say that it's there.
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
16 Dec 2015 09:53 PM
0x, show me an example in a function that return the data in a table

like


local Datastore = game:GetService('DataStoreService'):GetDataStore('GameData')
function GetData(key)
return Data
end
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
16 Dec 2015 10:03 PM
Or do you use HttpService and Encode the thing or does DS have a built in one.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Dec 2015 10:05 PM
You can save tables in DS (if it's not mixed and doesn't contain any non-serializeable values like instances etc etc).

Plus you can always just JSONEncode it yourself.
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
16 Dec 2015 10:11 PM
Tried it out before you said anything cnt, lol.
It seems to work smoothly, and I'm pretty mad at the person who taught me DS doesn't work via tables.
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
16 Dec 2015 10:14 PM
WaitForDataReady() does not return anything though, I think Roblox doesn't support the feature anymore?
Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
16 Dec 2015 10:15 PM
you're all silly it's waitfordatadone(())
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Dec 2015 10:16 PM
Well if it just "hangs" forever, you can use the loop and check the "DataReady" property of the Player and if, say, it hasn't been changed to true in more than 30 seconds than just notify them.

Although I'm pretty sure it's still supported, still a lot of popular old games that use them and they still work.
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
16 Dec 2015 10:16 PM
waitfordataready doesn't return anything, it just yields until dp is ready

/I have none to show to the one I love/
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Dec 2015 10:18 PM
puu dot sh/lYxSk/ef0fca11ce.png
- wiki

But the wiki could be wrong, I never run into these types of problems (I don't really script in Roblox Lua anymore so there's that) so who knows.
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