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 / File Writing Issues

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 19th Nov 2010 02:53
Hello peeps! I have been having issues trying to write data to a file. I try to write data to to a file, and when i try to open with dbp or notepad it's not there. i even try copying the examples from the help window included with CS. I could post a code snippet, but i dont know how. im somewhat mentally challenged towards nothing on the computer but forum posting, lol!

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
Brk_oth
20
Years of Service
User Offline
Joined: 8th Aug 2005
Location: Australia
Posted: 19th Nov 2010 03:24 Edited at: 19th Nov 2010 03:25
To post a code snippet, copy and paste it here. Put it into code tags - look at the button at the top right of the post message box.

As for your problem with the file writing, this is what you need.


Try posting your code so that we can see whats wrong.

No signature found...
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 19th Nov 2010 03:25
Thanks

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 19th Nov 2010 03:27
Haha, that what i tried. Your text must have the magic touch

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Nov 2010 11:40
@ Dark basic dude79:

Always remember that the file cannot exist before you write a new file so make sure you add code to delete the file if it exists before you write a new file.



If you forget that simple rule you'll end up pulling out all your hair because the file isn't saving right.


@ Brk_oth:

It's great that you told him to CLOSE FILE... a lot of people forget to tell newbies that.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 20th Nov 2010 17:38
Yah, i think that's what confuzelled me! indeed, i am a newbie;_) i dont know what the underscore in that face is supposed to mean

check my youtube channel at http://www.youtube.com/user/freeflightsimulator
Brk_oth
20
Years of Service
User Offline
Joined: 8th Aug 2005
Location: Australia
Posted: 22nd Nov 2010 00:23
@grog yeah I noticed alot of people dont remember to mention the close file, so I thought I would jump in on this one.. but I still ended up forgetting to mention to delete the file if it already exists.

No signature found...
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 01:21


New 3d marble game coming soon!
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 22nd Nov 2010 16:38
@ Brk_oth:

It's ok we all make mistakes. If I didn't do it or somebody else you would of eventually told him when he came back saying it doesn't work right.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 23:31
coffee

New 3d marble game coming soon!

Login to post a reply

Server time is: 2026-07-21 12:51:15
Your offset time is: 2026-07-21 12:51:15