FacesOfMu
Member
Took me a while to figure this out as the docs was a little light on it. I'm posting it here in case any other users are searching for it and need it.
To reference an included file your code might read:
BUT
If you've put your Included Files into a sub-group, the file name will need the name of that group and two backslashes \\ after:
When we refer to other assets in GMS2, we don't have to worry about their group names, but as the file system creates a literal folder directory with the name of your sub-group, you need to add it to the file name and use the correct separators.
Also, it's two backslashes as the first backslash tells the IDE that in this string there is a special character here, and the second backslash says that special character is a backslash (and not n for newline as in "\n" or t for tab as in "\t").
To reference an included file your code might read:
Code:
var file = file_text_open_read("this_file_name.csv");
If you've put your Included Files into a sub-group, the file name will need the name of that group and two backslashes \\ after:
Code:
var file = file_text_open_read("this group name\\this_file_name.csv");
Also, it's two backslashes as the first backslash tells the IDE that in this string there is a special character here, and the second backslash says that special character is a backslash (and not n for newline as in "\n" or t for tab as in "\t").