GameMaker Loading strings from a text document GML2

V

Viktor1031

Guest
How would i go about loading this text document list into an array inside of game maker?
s.JPG

It only needs to happen once in the game code
It's a list of almost all words of the English language.

Is there maybe a better option then loading it into an array?
 
D

Dengar

Guest
in the manual look up the function 'file_text_read_string' it has an example that does exacly what your wanting

Edit: just relised your using gms2. so my suggestion might not work.
 
Last edited by a moderator:
V

Viktor1031

Guest
Ok so i tried to copy over how game maker2 shows you. But i got an errorCrash.JPG

So the reason for this is that it can't find the file. I knew this because the file_text_open_read(working_directory + "Word.txt"); returned -1.return-1.JPG-1.JPG


Here is where i put my file: ->filer.JPG


Why does it not work?
Is the file at the wrong place or is the code wrong? Maybe is something else wrong?
 
Top