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.

Dark GDK / File writing problems

Author
Message
Pke Mstr
15
Years of Service
User Offline
Joined: 10th Feb 2009
Location:
Posted: 10th Feb 2009 21:40
None of Dark GDK's file writing command work for me.
I've completely uninstalled and reinstalled Dark GDK, MSV C++ compiler, and DirectX. One at a time and all at once. No change.
I decided to run the following code to see exactly where the problem is.

And I get the following output:

FileExist
1
FileOpen
0

This is a big problem because I can't even make save files now!
How in the world do i make a game without saving?
So any help to fix this would be greatly appreciated!!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Feb 2009 22:48 Edited at: 10th Feb 2009 22:49
Dump the DBPro file commands - seriously, they are slow, have funny behaviour (as you've noticed), and restrict you in what you can do (no read from a file opened in write mode for example).

The C equivalents are easy to use, fast, and allow you to read/write to the file at will (with care admittedly).

However, if you insist... the dbOpenToWrite command will NOT open a file that already exists - you need to delete the file before you open it to write to.

Pke Mstr
15
Years of Service
User Offline
Joined: 10th Feb 2009
Location:
Posted: 11th Feb 2009 01:18
Ok Thanks IanM. I thought the file had to exist to open it. I had that backwards.
Works just fine now
And thanks for the tip I'll check out the C equivalents.

Login to post a reply

Server time is: 2024-11-25 13:28:50
Your offset time is: 2024-11-25 13:28:50