GMS 2 Problems loading included files (ini) into the code

So I'm probably just being dumb but I'm having difficulty loading my included ini files into my script. I've tried several things and they haven't been working.

Currently I've got:
var curini = file_find_first(program_directory + "/events/",0);
which returns the error:
Error! not allowing file operation with filename 'X:\windows\events\.ini'.

none of the following work as well:
var curini = file_find_first(program_directory + "/events/*.ini",0);

var curini = file_find_first(program_directory + "\events\\*.ini",0);

var curini = file_find_first(program_directory + "/events/*.ini",fa_readonly);

// These two don't return errors, but they still don't work.
var curini = file_find_first(working_directory + "/events/*.ini",0);

var curini = file_find_first(working_directory + "/events/",0);


Anyone got an idea on how I'm screwing this up?
*I have all of my included files in a group called "events", for reference
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
For included files you should use just "events/", no program_directory prefixes.

If using GMS2, for backslashes you want "\\" instead of "\", else it becomes an escape character (like \n for line break)
 
Top