Editing a variable in a file

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tayete

I am having some issues editing a variable stored in a file. I seem to be uncapable of JUST editing it. I can open the file, store variables in it and closing the file, but all the info stored in the file is overwritten by the newly stored info.

Is there any example around about just EDITING one variable in a file, keeping the rest of the info intact?

Thanks in advance to this great community!

From my understanding of reading/writing files in the engine, a game first reads the variables (or whatever) in the file, then edits that data as necessary, and finally writes it out to the file. So a game could, for instance, read a JSON file, edit some arbitrary value in it, and write that data out to the JSON file.

Ertain | 2019-10-15 23:59