My problem is an odd one–when I run the game from the GameMaker client, everything works smoothly. But then, when I try running my level editor from an executable or .app, I get this error:
___________________________________________ERROR inaction number 1of Create Eventfor object obj_compile:Error opening file for writing.I've got no clue why this keeps happening.Here is a link to my .gmk file. All you need to do before you make a new dungeon is create a folder with your desired dungeon name, and make sure it is in the same folder as your game file. My code is kind of messy… Any help would be so very appreciated, I couldn't even begin to tell you. Just getting back into GameMaker, and I'm struggling my way through to competency again. Thanks!
Does the .lec file exist? you never check for it.
Also it may be more efficient to use only one file instead of 2, or possibly read for a number of lines, checking for an eof.I'm assuming GM7.
I tried to have a look at the code the other day, since I've used file I/O quite frequently. But since I don't have GM7 anymore, I thought I'd probably do more damage by trying to mess with it.Those errors have randomly popped up for me, too. What you have to do is make sure you closed the file in any other operations. A file can't be opened for writing if it's already open. So go through your code, find the times you do the reads and writes, and make sure file_close() is somewhere in there.