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: Datastore, data failures

Previous Thread :: Next Thread 
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 08:53 AM
My script structure

PlayerAdded
GetAsync load

PlayerRemoving
SetAsync save

while wait(180) do --3 minutes
SetAsync save each player
end
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 10:51 AM
Why is there some data loss?
Report Abuse
DevGamerzz is not online. DevGamerzz
Joined: 21 Dec 2015
Total Posts: 154
21 Feb 2016 10:52 AM
Pay Attention to what comes on my other thread "game.OnClose = function()" That is what you need to use.

#code if Developer == true then print('Developer') end
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 01:36 PM
I have that, same thing.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
21 Feb 2016 01:39 PM
take out the while loop, idiot.... a player will leave your game regardless so why the loop...



#code R+ | local RAP = "R$424,519"; local robux = "R$8,977"
Report Abuse
xXTheRobotXx is not online. xXTheRobotXx
Joined: 05 May 2012
Total Posts: 13343
21 Feb 2016 01:42 PM
"take out the while loop, idiot.... a player will leave your game regardless so why the loop..."

calling someone an idiot is very rude


#Code print("Narwhals are our future")
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Feb 2016 01:52 PM
"take out the while loop, idiot.... a player will leave your game regardless so why the loop..."


R00D

He is probably new to datastores...


Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 02:00 PM
'take out the while loop, idiot.... a player will leave your game regardless so why the loop...'

oh please, just lol

i am following this:
http://wiki.roblox.com/index.php?title=Saving_Player_Data

The reason with the while loop is what if the player disconnects? I don't think it triggers the playerremoving event...
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 02:01 PM
also why tf do i have u on my friend list lmao
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
21 Feb 2016 02:05 PM
u haxxx
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
21 Feb 2016 02:19 PM
Ya speaking to me?


Report Abuse
128Gigabytes is online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
21 Feb 2016 02:21 PM
Players disconnecting will fire the playerLeaving event.


playerLeaving is basically just


game.Players.ChildRemoving:connect(function(child)
if (child:isA("Player")) then
--[[Do things.]]
end
end)
Report Abuse
xXTheRobotXx is not online. xXTheRobotXx
Joined: 05 May 2012
Total Posts: 13343
21 Feb 2016 02:22 PM
here are some tips

you can entierly rely with player removing if you make sure that shutdowns can't mess up data using game.OnClose() which lets you save data before the game shuts down

your structure is fine otherwise

you most likely have an error in your code somewhere


#Code print("Narwhals are our future")
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