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

Why do i have an error for DataToSave saying (Expected identifier when parsing expression, got '{')?

Asked by 5 years ago
Edited 5 years ago

local DataToSave {}

01for _, Stat in pairs(Stats1:GetChildren()) do
02    table.insert(DataToSave, Stat.Value)
03    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
04end
05for _, Stat in pairs(Stats2:GetChildren()) do
06    table.insert(DataToSave, Stat.Value)
07    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
08end
09 
10PDS:SetAsync(Key, DataTo Save)

end)

0
i found the answer hopefully xTheodxre 16 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
01local DataToSave = {}
02for _, Stat in pairs(Stats1:GetChildren()) do
03    table.insert(DataToSave, Stat.Value)
04    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
05end
06for _, Stat in pairs(Stats2:GetChildren()) do
07    table.insert(DataToSave, Stat.Value)
08    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
09end
10 
11PDS:SetAsync(Key, DataToSave)
0
oh xTheodxre 16 — 5y
0
end) itz_rennox 412 — 5y
0
You Forgot at line 1 the = itz_rennox 412 — 5y
0
and in line 11 you wrote DataTo Save but its DataToSave itz_rennox 412 — 5y
View all comments (2 more)
0
ty xTheodxre 16 — 5y
0
no problem :D itz_rennox 412 — 5y
Ad

Answer this question