table saving
Akiba4Games
Member Posts: 13
I saved some table on the device, then on the go changed the type of a column (or even added some).
Seems like the device cannot overwrite table type neither add new data.
How can I solve it?
Comments
Create a new and different table, with all new columns, then in your code, at start you can transfer the data from old table to new one... and from that moment start to use the new table. To perform this operation once only, you can use an attribute to mark that you have made that transfer and not to do it again.
@CasualEvolution not so easy... I have almost all variable directly linked with that table, right now will be almost impossible to change table!!
Tables take some pre-planning for sure. In the future consider creating your tables with extra columns for slots you may need in the future.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
create a second table with the right type, then copy the value in the relative space (using an x=x+1 loop if too big), change manually the value you need example insert a text in an "integer" type column (preset this column with the right type) , then save an empty table on the first one, and after 0.1sec copy the modded table in the first one.