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

data stores and tables - unknown error?

Asked by 8 years ago

I was just wondering if someone could help me debug and error which ive never seen before:

"ServerScriptService.DataSave:20: attempt to index field '?' (a nil value)"

Here is the section of code:

local Pstats = Pdata:GetChildren() -- Pdata is an object value containing a Number Value, two int Values and a Bool Value.  However, if i take out the three values that are not a Bool Value i lose the error.
        local S2 = {}
        for i=1,#Pstats do
            local n = Stats[i].Name -- error here (line 20)
            S2[n] = Stats[i].Value
        end

All the integers in the Values are correct, is it possible that i cant save multiple different values in one table?

Thanks for any help, it might be a small thing but im blind :) ~thanks, Bubs

0
Your error is on line 20. That'd probably be a useful section of code to include. ScriptGuider 5640 — 8y
0
i did include it -_- Bubbles5610 217 — 8y

Answer this question