I'm still struggling with this:
if i declare my topmost table outside function:
Code:
local skillzmain = {}
then, inside the function, after the skillzmain table has been populated:
Code:
if (skillzmain.sp == 2) then
local dudename = skillzmain.sn
print ("*"..dudename.."*")
if skillzmain.dudeTable == nil then
skillzmain.dudeTable = {}
print("created skillzmain.dudeTable.")
end
if skillzmain.dudeTable.dudename == nil then
skillzmain.dudeTable.dudename = {
["ts"]=timestamp,
["spn"]=sName,
["ha"]=tonumber(Amt),
["oh"]=tonumber(Amt2),
["cr"]=wasC,
["dn"]=destName,
["rn"]=duderegnum
}
print("created skillzmain.dudeTable."..dudename)
end
end
it doesnt seem to be saving the tables.
if i call to the function with proper variables.. the tables get created, as will be shown by the prints inside each.
if i call to it again, it creates them all again, as shown by the prints within them again.
do i need to somehow declare every subtable globally? am i not properly doing this? maybe theres a problem with how im using the variable to name the table..
lost.