saving string in txt file

VovoNauta

Member
I'm trying to save a string in a text file (it's in the datafiles folder) but I can't.

What is wrong in the lines below? Or is it not that simple?


=========================================

if (keyboard_check(ord("V"))){

global.text += clipboard_get_text()

}




if (keyboard_check(ord("S"))){

var file = file_text_open_write(working_directory + "UQ2.txt")


file_text_write_string (file,global.text)



file_text_close(file);
}
===========================

tks
 

TsukaYuriko

☄️
Forum Staff
Moderator
Where are you looking for the output file? It won't be in the datafiles folder, but in the local storage (e.g. %LOCALAPPDATA%/Name of your game on Windows).
 

VovoNauta

Member
I read the file system information, but I confess (I'm a beginner) that it was not clear.



1- How to save to data files (if possible)? (I see my files saved in /Users/<User Name>/AppData/Local/<Game Name> ).

2- how to open files from /Users/<User Name>/AppData/Local/<Game Name>? (need to disable sandbox?, or i need to use get_open_filename() and get_save_filename() ?)



OK!
 
Last edited:
Top