|
| 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 |
|
|
| |
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 16 Jun 2012 10:02 AM |
I doubt it is.
Anyone else?
- Striked |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2012 10:05 AM |
Come on people...
- Striked |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2012 09:26 AM |
Guys... I am having trouble on this part. The rest works fine...
- Striked |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2012 09:28 AM |
| This isn't the case for me. It works fine in my game. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2012 09:30 AM |
I seriously don't know why it doesn't save...
- Striked |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 17 Jun 2012 09:51 AM |
""TotTime""
Is that spelled correctly? |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2012 10:04 AM |
Yes... It's a quick abbreviation. That's a value's name...
- Striked |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2012 11:09 AM |
...
No one has a solution..?
- Striked |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2012 03:30 AM |
As I said before; IT DOES NOT WORK CORRECTLY GET THRU UR BRAIN K |
|
|
| Report Abuse |
|
|