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 / write string but file emty

Author
Message
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 7th Apr 2017 18:58
I read previously messages about writing to the file and there is a solution, but they do not work for me.

That's what should be written down

But the file is empty


Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 7th Apr 2017 20:37
Dont use make file, this is the problem.

Open to write is all you need. It will create the file if it didn't exist.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 8th Apr 2017 07:28
thank you very much.
It works with this code.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 8th Apr 2017 08:10

here is a little program I wrote a while back it checks every few seconds minutes hours whatever if a file is up to date or not and if it isn't it will update it. It has some simple error handling and a basic settings file that is will create and read from when it is ran. designed it to back up files I was working on. can run it in hidden mode as well in the background.


A child's dream never dies.





Bored of the Rings
User Banned
Posted: 8th Apr 2017 10:02
also you should add code to overwrite the file to replace it with an updated version if you need to, example below:

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 14th Apr 2017 15:30
on my version of dbpro, delete file already checks if the file exists or not. calling delete file on a file that doesn't exists never made an error or stopped the execution of my programms. i don't know if this is compiler version specific or not.

Login to post a reply

Server time is: 2024-04-19 06:08:33
Your offset time is: 2024-04-19 06:08:33