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.

Newcomers DBPro Corner / saving data

Author
Message
CarlTaylor
21
Years of Service
User Offline
Joined: 13th Jan 2003
Location: United States
Posted: 13th Oct 2003 01:40
how would i go about saving the data in an array to a file on the hard drive for later use?

thanks

-carl

P4 2gig, 256mb RAM, 64mb DDR NVIDIA GeForce4 Ti 4200 w/ TV Out
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 13th Oct 2003 03:38
You could use the SAVE ARRAY / LOAD ARRAY commands.
Or you could use the file commands.
CarlTaylor
21
Years of Service
User Offline
Joined: 13th Jan 2003
Location: United States
Posted: 13th Oct 2003 04:46
wow that was a pretty dumb question wasnt it lol thanks winch

P4 2gig, 256mb RAM, 64mb DDR NVIDIA GeForce4 Ti 4200 w/ TV Out
Eckie Thump
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location:
Posted: 15th Oct 2003 20:57
Not such a dumb question, I'm having the same problem myself.

I've just got DarkBasic having used QBasic for many years although I was never what you might called skilled!

In QBasic you could use a Do until EOF() type loop to write data from an array to a file and you would end up with a database something like:-

Name, Rank, Number
Name, Rank, Number
Name, Rank, Number
Name, Rank, Number

You could then use a silmilar loop to read a certain line of data back into the array.

I've used Load Array but had to have the file in the following format for it to work:-

Name
Rank
Number

Rather limiting.

Now I know there's a way to do what I want in DarkBasic, I just can't figure it out.

Any help would be greatly appreciated.
Cheers.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Oct 2003 22:27
I believe in order to LOAD ARRAY you have to have saved it with SAVE ARRAY as it is encrypted.

Check out this current thread for ideas...

http://darkbasic.thegamecreators.com/?m=forum_view&t=18422&b=1

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Oct 2003 22:45
It's not encrypted, but it is in a special format

A better post for loading/saving arrays is here : http://darkbasic.thegamecreators.com/?m=forum_view&t=16810&b=7

Login to post a reply

Server time is: 2024-09-21 06:22:26
Your offset time is: 2024-09-21 06:22:26