Here is me making the table outside of the function. (I commented out my previous work that worked fine until I needed to make a table). I think the problem is that box1num and the others are no longer being defined as locals? But If I remember correctly, even if I added local within the brackets, I wasn’t able to get it to function without error "unexpected symbol near ‘local’ ".
Currently the error message is the following: “attempt to index field ‘box1num’ (a nil value)” in my reset function.
Code outside the reset function:
[lua]local boxTable = {box1num, box2num, box3num}
–local box1num
–local box2num
–local box3num
[/lua]
*edited*
[lua]
box1num= native.newTextField (x, y, display.contentWidth/10, display.contentHeight/28, function )
box1num:setReferencePoint (display.CenterReferencePoint)
box1num.x = display.contentWidth/1.7
box1num.y = display.contentHeight/3.6[/lua]
Within the reset function:
[lua]
boxTable.box1num.text = 0
boxTable.box2num.text = 0
boxTable.box3num.text = 0
[/lua]
Thanks for any help, any ideas/thoughts are much appreciated!