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 / #Include, but how?

Author
Message
Stora tomtefar
20
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 23rd Jul 2005 03:43
Well, I know that you can by using the "include-command retrive data from other .dba files into your primary project, wich I've tried to do. I'm making a car game, and I want that the .dba file wich is containing the .3ds object's that is the whole course. Since I want multiple course's in my game, I just want to Include these using the famuos "inklude command. But, here's the but, when I'm using this, nothing happends. My car is just shown, and I don't know what to do. Help? How can I use the #include to get the data from another file, to this in wich the rest of the game is?

Here is the code for the .dba file in wich I want to "include the other file, wich I attach for you to download?

"Even though I'm ugly, I'm extreamly sexy!"
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Jul 2005 09:56
I think you maybe have the wrong idea about what #Include files are actually for.

#Include files are intended ONLY for functions you want to use in your programs and are a time-saving feature.

For example, you might write a collection of functions which handle all the keyboard, mouse and joystick input in your program. You could save these functions as a file called Input.dba.

In all subsequent programs, you could pop that .dba file in the same folder as your new games and use:

#Include "Input.dba"

and access all the functions without having to write them all again.

What you need to take a look at I think is the File Access commands like Open To Read so you can load data files from disk.

TDK_Man

Login to post a reply

Server time is: 2025-05-22 22:14:08
Your offset time is: 2025-05-22 22:14:08