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 » Scripting Helpers
Home Search
 

Re: Data Persistence Trouble.

Previous Thread :: Next Thread 
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 09:03 AM
My Data Persistence script doesn't save scores, yet loads them...

Basically, I'll give you the savescore function in my script and the player leaving part.

function SaveStats(player, score) -- Saves score
player:SaveNumber(score.Name, score.Value)
end

game.Players.PlayerRemoving:connect(function(p)
local isgroup = false
if not p:IsInGroup(273452) then
return
else isgroup = true
end

if isgroup == true then
p:WaitForDataReady()
wait(.7)
local stats1 = p:findFirstChild("StatsHolder")
if stats1 ~= nil then
local stats2 = stats1:findFirstChild("NumberTime")
local stats3 = stats1:findFirstChild("TotTime")
local stats4 = stats1:findFirstChild("AmountDefended")
local stats5 = stats1:findFirstChild("TimeDefended")

if stats2 ~= nil and stats3 ~= nil and stats4 ~= nil and stats5 ~= nil then -- broken maybe?
SaveStats(p, stats2) -- Supposed to save all scores.
SaveStats(p, stats3)
SaveStats(p, stats4)
SaveStats(p, stats5)
end
end
end
end)

StatsHolder holds all the stats here... but i have the feeling it's the if statement at the end

I'm not given output, so I can't help you there...

- Striked

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 09:07 AM
bump

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 09:46 AM
bump again

- Striked
Report Abuse
ShuckleSoup is not online. ShuckleSoup
Joined: 21 Apr 2012
Total Posts: 24
16 Jun 2012 09:47 AM
I think they broke Data Persistance, mine stopped working as well, and can't get it to function right.
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 09:52 AM
If that were to happen, the Scripters/Scripting helpers forums would be in a frenzy...

But anyways... I need help fixing this...

- Striked
Report Abuse
ShuckleSoup is not online. ShuckleSoup
Joined: 21 Apr 2012
Total Posts: 24
16 Jun 2012 09:54 AM
It doesn't work, I'm serious.
Last time I asked about it in Scripting Helpers, nobody knew, then I went to Scripters and they said it had broken.
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 09:54 AM
Okay.

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 10:02 AM
I doubt it is.

Anyone else?

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
16 Jun 2012 10:05 AM
Come on people...

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
17 Jun 2012 09:26 AM
Guys... I am having trouble on this part. The rest works fine...

- Striked
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
17 Jun 2012 09:28 AM
This isn't the case for me. It works fine in my game.
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
17 Jun 2012 09:30 AM
I seriously don't know why it doesn't save...

- Striked
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
17 Jun 2012 09:51 AM
""TotTime""

Is that spelled correctly?
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
17 Jun 2012 10:04 AM
Yes... It's a quick abbreviation. That's a value's name...

- Striked
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
17 Jun 2012 11:09 AM
...

No one has a solution..?

- Striked
Report Abuse
ShuckleSoup is not online. ShuckleSoup
Joined: 21 Apr 2012
Total Posts: 24
06 Jul 2012 03:30 AM
As I said before;
IT DOES NOT WORK CORRECTLY
GET
THRU
UR BRAIN
K
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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