ToyImp
15-07-2007, 08:46 PM
I'm trying to get a variable to be saved and I keep getting an error:: attempt to index field '?' (a string value)
with this::
CharacterData[TargetName][TargetClass] = UnitClass("playertarget")
I can get the TargetName to write without having the class. But how do I add another layer to the table?
The savedvariables file should look like this::
That's not what I need it to do though. I need it so that in the saved variable's the class of a players name will be found. So the class variable is going to be saved many times.
SavedVariables = {
["Xerexes'] = {
["Class"] = "Warlock"
["Level"] = "70"
}
}
with this::
CharacterData[TargetName][TargetClass] = UnitClass("playertarget")
I can get the TargetName to write without having the class. But how do I add another layer to the table?
The savedvariables file should look like this::
That's not what I need it to do though. I need it so that in the saved variable's the class of a players name will be found. So the class variable is going to be saved many times.
SavedVariables = {
["Xerexes'] = {
["Class"] = "Warlock"
["Level"] = "70"
}
}