File Problem

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!

Moderators: Pete, Mods

Post Reply
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

File Problem

Post by RayBritton »

Hi,
I have problem i saved in binary 27 varibles but there don't load correctly
(i'm using pds and the program is 1000+ lines so i can't put it up here)
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

If you're always saving the same 27 variables all the time, you should use a type definition for those 27 fields this way, you'll always read what you save :-)....if you want an example, have a look at my binary file tutorial in pete's QB Express magazine Issue 8

http://www.petesqbsite.com/sections/exp ... inaryfiles

I use a typed structure in the example I use for the tutorial. if you have questions after that let me know here, in PM or email me, which ever you prefer.

Hope this helps
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton »

i found the problem, it's that when i open the file, as:

Code: Select all

INPUT "Name:",filename$
OPEN filename$ FOR BINARY ACCESS READ AS #1
this deletes the data in the file, or creates a new one
Post Reply