first you have to make sure that each subtable is created before using it
Code:
data[ID] = data[ID] or {}
data[ID][Player] = data[ID][Player] or {}
data[ID][Player][level] = data[ID][Player][level] or {}
also you can not use the . table notation for numbers or strings that start with numbers
as such when you want to reference it again you need to use:
Code:
data[2].Bob[80]
or
data[2]["Bob"][80]
Also you seam to have a somewhat inefficient database layout
why not do something like this
Code:
data[ID] = {
["name"] = "Bob",
["level"] = 80,
["text"] = something,
}
this way you only create one table per ID (saves memory and will probably make it easier to look through your SV file while also making it a little bit faster to load)