You all know how instance_nth_nearest works right? It finds the id of the nth object object where n is a number put in by the user. What I want is to find the first 3 files that have certain extension(.sav). Im not too good with files in GM so any help would be appreciated.
If you tell me what you want it to do, I can show you how to do it in the patented TG way….
By using the file_find functions, you could use file_find_next three times, and record it each time to get the first three. I'll make an example or something.
Melee, why do you always have to brainwash people into thinking they need to make exess hard code and such?
:PThat only works if the files are like-
file1file2file3Right?Mine could have different names…Don't worry, even they have different names it's fine.
Im a little confused as to how I would use it. I have 3 save slot objects, each one finds a different file(if any) and draws the file name. Im thinking this might be a problem since its all 1 object doing the same thing at once.
Sweet I got it! I just had the file variable set when I created the save file objects in another object. Thanks for you help though.
Here's an example:
You put 0 as the first argument, and 3 as the second argument to return the first three files found (if there were only two files, it'd return Null, which I should probably fix…). Now, if you had put 1 as the first argument and 3 as the second argument, it'd find the three first files from the second file.The value it returns is a string with each file on a new line.Oh, I posted a bit too late, xD.