about 30 mins after posting this, i had been messing with ipairs, and it wasn't working.
then i switched the indexes so that numeric came first. everthing worked fine after that. now i have another table - related issue:
i have a simple table, with a few "starting" values; basically filler text.
farming = {
[1] = {
XCoord = "-----",
YCoord = "-----"
},
[2] = {
XCoord = "-----",
YCoord = "-----"
},
}
i have another table which references them among other things:
local desktopGrid = {
[2] = {
[1] = {
[1] = {
[3] = {line = 2,indent = 0,button = false,textField = true,buttonBegin = 15,buttonEnd = 19,text = "North East X: [ ]",onClick = farming[1].XCoord},
[4] = {line = 3,indent = 0,button = false,textField = true,buttonBegin = 15,buttonEnd = 19,text = "North East Y: [ ]",onClick = farming[1].YCoord},
[5] = {line = 4,indent = 0,button = false,textField = true,buttonBegin = 15,buttonEnd = 19,text = "South West X: [ ]",onClick = farming[2].XCoord},
[6] = {line = 5,indent = 0,button = false,textField = true,buttonBegin = 15,buttonEnd = 19,text = "South West Y: [ ]",onClick = farming[2].YCoord},
},
}
}
}
then i use the following code to change my original table:
desktopGrid[2][1][menuItemSelect][e].onClick = read()
this works just fine... while my program is running. the table changes and i am able to write those changes to the screen.
However; when i attempt to write the farming table to a file, it only outputs the filler values that i started with.
i found that when i point read() directly at the first table, it writes like it should. but when i point it indirectly, it doesn't. I have an idea of a workaround, i just wonder if anyone can explain why this happens?