• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML [SOLVED] Writing into included .txt

S

SamSam

Guest
Hi, I am trying to figure out the theme of the GAAAAAAAAME JAAAAAAAM !

I am making a small software wich reads a word list, and writes the 8 characters words in another file. Both files are included .txt.
Code:
analysedWord = "0";
fileRead = file_text_open_read("sourceList.txt");

{ do {
    analysedWord = file_text_read_string(fileRead);
    file_text_readln(fileRead);
    
    if (string_length(analysedWord) == 8) {
        fileWrite = file_text_open_append("resultList.txt");
        file_text_write_string(fileWrite, analysedWord);
        file_text_writeln(fileWrite);
        file_text_close(fileWrite);
    }
} until(file_text_eof(fileRead)) }

file_text_close(fileRead);
The problem is I can't get the string to write itself into resultList.txt. I have debug checked everything else so the error is in there :
Code:
fileWrite = file_text_open_append("resultList.txt");
        file_text_write_string(fileWrite, analysedWord);
        file_text_writeln(fileWrite);
        file_text_close(fileWrite);
Thank you for your help !
 

FrostyCat

Redemption Seeker
The resultList.txt with the appended content is in %localappdata%\GameName or %appdata%\GameName (depending on what you specified for Options > Windows > Save Location), not in your project's Included Files.

Is this your first day with the GMS sandbox?
 
S

SamSam

Guest
Oh man can't get used to it. Thanks a lot !

Is this your first day with the GMS sandbox?
No, actually all my recent issues have been related to this. It's like something in my mind is stuck about this system...
 
Top