I've got some code that takes in a .csv file and does some operations with it. Unfortunately, when I try to load the file (which is in the datafiles folder of the Included Files), the global.data variable remains empty. It doesn't throw an error at me, it just doesn't work.
Here is the function that imports the data, located as a Script:
function importdata(_rdata){ global.data=load_csv(_rdata);}And here is the use of the function, located in the Create event of an object:
importdata("flight_data.csv");if (!global.data){ show_debug_message("No data!");}show_debug_message("Array Length: " + string(array_length_2d(global.data, 1)));When I run this code, it tells me that there is no data and that the length of the grid is zero. I have checked the flight_data.csv file itself of course, and it is populated with 350 KB of data (even says so according to Gamemaker itself). Any help would be greatly appreciated.