save function

photo = loadsave.loadTable("Photo.json") if photo ==nil then photo = {} photo[1] = 1 photo[2] =0 photo[3] = 0 photo[4] = 1 photo[5] = 0 photo[6] = 0 photo[7] = 1 photo[8] = 0 photo[9] = 0 loadsave.saveTable(photo, "Photo.json") else end

I have use loadsave function in my game , how can i change the 1 of the photo[4] to 0 and save just one time?

photo[4] = 0

loadsave.saveTable(photo, “Photo.json”)

It’s designed to save the whole table.  It’s a far more complex operation to try and parse the text file this is stored in to write out an intermediate record.  Saving the whole table, in particular something so tiny, it’s not work the programmer time to save a couple of micro-seconds.

Rob

photo[4] = 0

loadsave.saveTable(photo, “Photo.json”)

It’s designed to save the whole table.  It’s a far more complex operation to try and parse the text file this is stored in to write out an intermediate record.  Saving the whole table, in particular something so tiny, it’s not work the programmer time to save a couple of micro-seconds.

Rob