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 {}

for _, Stat in pairs(Stats1:GetChildren()) do
    table.insert(DataToSave, Stat.Value)
    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
end
for _, Stat in pairs(Stats2:GetChildren()) do
    table.insert(DataToSave, Stat.Value)
    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
end

PDS: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
local DataToSave = {}
for _, Stat in pairs(Stats1:GetChildren()) do
    table.insert(DataToSave, Stat.Value)
    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
end
for _, Stat in pairs(Stats2:GetChildren()) do
    table.insert(DataToSave, Stat.Value)
    warn("Player Left, Saving " .. Stat.Name .. " | " .. Stat.Value)
end

PDS: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