I am writing a custom save feature, which involves using INIs for saving/loading global variables, and text files for saving/loading arrays.
I am having trouble with loading from a text file. When I try to save/load the value for an array, I have the following code:
//when saving:
lira_array=file_text_open_write('arrays/lira_array')
file_text_write_real(lira_array, global.lira[1])
file_text_close(lira_array)
//when loading:
lira_array=file_text_open_read('arrays/lira_array')
global.lira[1]=file_text_read_real(lira_array)
file_text_close(lira_array)
The saving appears to be working fine, but whenever I try to load the value for global.lira[1], the value does not change to what is saved in the TXT file.
Any help would be very much appreciated.
Edited by sonosublime, 19 April 2012 - 12:44 PM.











