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 Discussion / Reading numbers from a file , how ?

Author
Message
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 17th Jan 2006 06:48
How to read numbers from a file using Db classic ?

Like from a text file witch contains this :
23


to read it and to get 23 in Dark Basic..


With Racer generator you will be easily able to put track , checpoints , cars , set up preferences , Set up world with ease..
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jan 2006 09:34
The problem is that if you actually write the file in notepad or something it wont read them properly, you need to read them as strings (using the read string command) and then turn them into numbers using the val() command : num=val(num$)

Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 17th Jan 2006 11:36
ok , it seems to work , thanks


With Racer generator you will be easily able to put track , checpoints , cars , set up preferences , Set up world with ease..
Computer Nerd
20
Years of Service
User Offline
Joined: 25th Jan 2005
Location: What do you care?
Posted: 17th Jan 2006 20:25 Edited at: 17th Jan 2006 20:25
I can help it's easy for a moi.

(Edit) Sorry read Zotos thread this might not worth reading then



Hey doods, check out Game Developer's official page at http://gamedeveloper1.tripod.com/. Visit my work in progress thread too. Game Developer, make your own 2d games and have fun doing it.

Login to post a reply

Server time is: 2025-05-22 23:48:51
Your offset time is: 2025-05-22 23:48:51