Sabe in nex in MyData

HI!

I need to sabe information automaticly in my app, but in a new position of my table of my MyData

For example, I need to sabe questions that the user do:

When He/she tap in “SAV”, the question save in a position in myData. 

I think that using:

x = 1

function save(event)

    myData.question.[x] = question

    x = x +1

end

will be enough but it isnt work.

Some idea?

Thanks!

PD: sorry for my bad english!

Only adding data to a table will not save the data. If you want to save the data so it can be loaded next time the app is run, you need to store it to a folder:

https://docs.coronalabs.com/api/library/system/DocumentsDirectory.html

You can use the functions here:

https://github.com/robmiracle/Simple-Table-Load-Save-Functions-for-Corona-SDK

to easily save and load tables.

Rob

Only adding data to a table will not save the data. If you want to save the data so it can be loaded next time the app is run, you need to store it to a folder:

https://docs.coronalabs.com/api/library/system/DocumentsDirectory.html

You can use the functions here:

https://github.com/robmiracle/Simple-Table-Load-Save-Functions-for-Corona-SDK

to easily save and load tables.

Rob