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 / DataBase writing in DBClassic

Author
Message
Vernon
20
Years of Service
User Offline
Joined: 26th May 2004
Location: Fresno, CA
Posted: 7th Jun 2004 22:58
Trying to figure out Database commands in DarkBasic Classic.

I 'm trying to write out if list of strings and Integers for Player statistic tracking, but any integer I 'write' does not come out as readable text, which command should I be using?

Thanks for the help

PS:anyone know how to get a return_line charcter in there?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Jun 2004 03:16
you want readable text, write text then. string.

"eureka" - Archimedes
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Jun 2004 16:02
He means:

write string 1, str$(Value)

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 8th Jun 2004 23:59
return is chr$(13) so just do

a$=str$(number)+chr$(13)

be careful doing that though, you might mess up the way DB writes information to files, it must use it`s own delimiter to seperate text etc, it might be chr$(0), but then again it might be chr$(13), so adding in extra control codes might mess up the information, for example

123
456
789

might end up as

123

456

789

with a null string between entries, I should take it as read that DB seperates the characters and just add anything extra in as you seperate the entries.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Vernon
20
Years of Service
User Offline
Joined: 26th May 2004
Location: Fresno, CA
Posted: 9th Jun 2004 01:25
Thanks for the assists guys, It's helped a lot. If it's not too much trouble, I was hoping someone might also have info on DBclassic and loading functions and code from other files. I was hoping to divvy my code into different files for more managbility. Thanks again!

Login to post a reply

Server time is: 2024-09-22 12:46:33
Your offset time is: 2024-09-22 12:46:33