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 / wont write correctly

Author
Message
Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 12th Aug 2014 04:40
Ive been trying to make a code that saves my players name after I've typed it. I've already got it to display it above the model and everything. I just want to write the string into a file. So when I go to my game Ijust load up the file, which I've already coded the loading part. But the problem is, iit works when I save the string into a txt file, but won't actually write it for the game. I've checked the file I put it into and it has the string. Idk if I'm making any sense sorry. And I can't put any code for you guys right now until I get wifi. I'm using my phone for this
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Aug 2014 06:53
Make sure you're calling close file after reading or writing the data. This flushes the input/output buffer and ensures the data has been written to disk.

write:




Mikeygd3
12
Years of Service
User Offline
Joined: 18th Dec 2013
Location:
Posted: 12th Aug 2014 07:46
@thecomet yeah I've always done that. And its pretty shocking of him committing suicide v.v
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 12th Aug 2014 09:10 Edited at: 12th Aug 2014 09:11
Mikeygd3, Umm when you say Write File
Quote: "but won't actually write it for the game."
do you mean on a second attempt? I believe you need to delete the file and write the file again, so probably might want to work out a system if you want to keep the data stored...

EDIT

Reading your message again Umm, is there just one line in the file?

Login to post a reply

Server time is: 2026-07-05 17:32:37
Your offset time is: 2026-07-05 17:32:37