M
M4v3r1k
Guest
Hi Everyone
I'm having some trouble on importing a file in my code.
Hope someoune can point me in the right direction
I save test.txt in the working directory and now tryng to open it with this code:
than I would like to double check the content in this way:
show_debug_message(scr[1])
show_debug_message(scr[2])
show_debug_message(scr[3])
but I get this error message:
File is not opened for reading.
at gml_Object_obj_import_button_Mouse_0 (line 7) - scr = file_text_read_real(file);
In the Source Control windows I can read:
ERROR!!! :: Failed to open file: Y:\Chess_Engine_2_3E78BA7C_VM\test.txt
looks like the system look for the file in wrong place (I don't have Y: drive)
Thanks to everyone that can help
M.
I'm having some trouble on importing a file in my code.
Hope someoune can point me in the right direction
I save test.txt in the working directory and now tryng to open it with this code:
GML:
var i, file;
file = file_text_open_read(working_directory + "test.txt");
for (i = 0; i < 10; i += 1)
{
scr[i] = file_text_read_real(file);
file_text_readln(file);
scr_name[i] = file_text_read_string(file);
file_text_readln(file);
}
file_text_close(file);
show_debug_message(scr[1])
show_debug_message(scr[2])
show_debug_message(scr[3])
but I get this error message:
File is not opened for reading.
at gml_Object_obj_import_button_Mouse_0 (line 7) - scr = file_text_read_real(file);
In the Source Control windows I can read:
ERROR!!! :: Failed to open file: Y:\Chess_Engine_2_3E78BA7C_VM\test.txt
looks like the system look for the file in wrong place (I don't have Y: drive)
Thanks to everyone that can help
M.
Last edited by a moderator: