The basic facts are: I choose a model, i choose its position and, when I'm ready, I press enter and, in the file "map.txt" it's added a line with the code I need (that will be read, after, in the game, such as CreateModel(x,y,z,name)
So, if I make a map with 4 objects and the room, it should be a text file with 5 lines:
CreateModel(0,0,0,room.3ds);
CreateModel(20,11,0,forniture.3ds);
CreateModel(40,22,40,lamp.3ds);
CreateModel(60,33,1,door.3ds);
CreateModel(80,90,6,control_panel.3ds);
Now... my camera set it all up.
In the create event of my camera, I wrote:
fail = file_text_open_read("mappa.txt");Fail is how I read "file", pretend it's ok, nothing about failing XD
In the Enter keyboard press event (that I press when I finish with that model) I wrote:
file_text_write_string(fail,"InstanceCreate(" + string(new_model.x) + "," + string(new_model.y) + "," + string(new_model.z) + "," + string(global.file) + ");");
file_text_writeln(fail);I get:
ERROR in
action number 1
of Key Release Event for <Enter> Key
for object camera:
File is not opened for reading.
What's wrong with it?
The file doesn't even get created.



Find content
Male
