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 Discussion / can I make a file?

Author
Message
Blazer
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 21st Jul 2003 00:02 Edited at: 21st Jul 2003 00:02
in game i want to be able to save a file that stores a few numbers, then loades it up when i need it, is this possible and if so how?

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Trowbee
22
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 21st Jul 2003 01:00
Yes, this shows how to read/write strings

To write to a file:
Open to write 1,"filename"
write string 1,"your text/numbers"
close file 1

To read from the file:
Open to read 1,"filename"
read string 1,variable$
close file 1

Login to post a reply

Server time is: 2025-05-19 16:20:08
Your offset time is: 2025-05-19 16:20:08