Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

leaderboard datastore script indentation error?

Asked by 5 years ago

I think this may just be me being stupid but I tried adding a death counter and messed up my script

01local DataStoreService = game:GetService("DataStoreService")
02local myDataStore = DataStoreService:GetDataStore("myDataStore")
03 
04local player = game.Players.PlayerAdded:Connect(function(player)
05 
06    local leaderstats = Instance.new("Folder")
07    leaderstats.Name = "leaderstats"
08    leaderstats.Parent = player
09 
10    local collectibles = Instance.new("IntValue")
11    collectibles.Name = "Collectibles"
12    collectibles.Parent = leaderstats
13    collectibles.Value = player.leaderstats.Collectibles.Value
14 
15    local deaths = Instance.new("IntValue")
View all 66 lines...
0
ServerScriptService.leaderboard:49: Expected <eof>, got 'end' i get this error Imgood543 21 — 5y
0
So I put the deaths script into a separate script, the death counter works now but doesn't save. Imgood543 21 — 5y

1 answer

Log in to vote
0
Answered by
b2lego 30
5 years ago

I'm kinda new but if I'm not mistaken, if you got the error message "got 'end'", I believe this means that you have an extra end somewhere the doesn't correspond with a beginning

0
I think it's line 48. I don't see anything that corresponds to that, try removing it and see if it works b2lego 30 — 5y
Ad

Answer this question