Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Writing to file doesn't work when file is created.

Author
Message
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 8th Sep 2010 18:01
I was working on a quick level editor when I hit a problem. It seams that when I use Make File and then open that file with Open to Write, I cannot write data to it but if I just open a preexisting file, I can write to it.
Help?


My computer surpasses all the technologies of the day. What computer do I have?

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Sep 2010 18:03
When you use OPEN TO WRITE, the file shouldn't exist already. The command creates it. Don't know why it works with a prexisting file, but just remove the MAKE FILE command and that should do it.


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 8th Sep 2010 18:20
Oh okay thanks, I didn't know that.

My computer surpasses all the technologies of the day. What computer do I have?

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 8th Sep 2010 21:15
Yeah this was an other of those strange silly things which robbed a couple of hours from my life...

Like the real problems wouldn't be enough.

Login to post a reply

Server time is: 2026-07-22 12:41:18
Your offset time is: 2026-07-22 12:41:18