plastrader
27-10-2006, 06:54 PM
Hi
I'm trying desperatly to get my dynamic savedvariable(table) to load propperly in my mod
the structure of my table looks like htis
VarName = {
["Key1"] = {
["UniqueID1"] = {
["Dynamic2"] = {
["Value1"] = 34,
["Value2"] = 1337012345,
},
},
["UniqueID2"] = {
["Dynamic2"] = {
["Value1"] = 42,
["Value2"] = 13515,
},
},
},
["Key2"] = {
["UniqueID1"] = {
["Dynamic2"] = {
["Value1"] = 34,
["Value2"] = 1337012345,
},
},
["UniqueID2"] = {
["Dynamic2"] = {
["Value1"] = 42,
["Value2"] = 13515,
},
},
},
}
what I want here is to loop through all Dynamic[x] and dig out
UniqueID[x] and summerize the Value[x]
like
["Key1"]["UniqueID1"]["Dynamic2"]["Value1"]
+
["Key1"]["UniqueID2"]["Dynamic2"]["Value1"]
which would be 76
Does it make sense at all?
VarName[1] doesn't work, returns nil...
what should I do?
Thanks in advance.
I'm trying desperatly to get my dynamic savedvariable(table) to load propperly in my mod
the structure of my table looks like htis
VarName = {
["Key1"] = {
["UniqueID1"] = {
["Dynamic2"] = {
["Value1"] = 34,
["Value2"] = 1337012345,
},
},
["UniqueID2"] = {
["Dynamic2"] = {
["Value1"] = 42,
["Value2"] = 13515,
},
},
},
["Key2"] = {
["UniqueID1"] = {
["Dynamic2"] = {
["Value1"] = 34,
["Value2"] = 1337012345,
},
},
["UniqueID2"] = {
["Dynamic2"] = {
["Value1"] = 42,
["Value2"] = 13515,
},
},
},
}
what I want here is to loop through all Dynamic[x] and dig out
UniqueID[x] and summerize the Value[x]
like
["Key1"]["UniqueID1"]["Dynamic2"]["Value1"]
+
["Key1"]["UniqueID2"]["Dynamic2"]["Value1"]
which would be 76
Does it make sense at all?
VarName[1] doesn't work, returns nil...
what should I do?
Thanks in advance.