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 Professional Discussion / #include 'ing files....how to do it?

Author
Message
PowerFang
21
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 23rd Feb 2004 01:58
I'm making an rpg and the map editor and game engine have alot of common values such as Variables and Routines.

My question is how can i make 1 file the both of them use so when i make changes in one it effects both of them. And, what sorts of stuff can i put in this file?? Only functions or can i put in GOSUB routines and what about global variables?

Any help is appretiated.

Thanks
burrbittyburr
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location:
Posted: 23rd Feb 2004 02:43 Edited at: 23rd Feb 2004 02:45
Program Files\Dark Basic Software\Dark Basic Professional\Video

^ There are tutorials in that folder that show you how to #include and all that.
In DBPro all you have to do is click the Setting tab on the right panel. Then up top where it says Browse; just click that and select the file you want to use.
You'll now have 2 programming windows. You can toggle between them by clicking the dropdown box in the -top center- of the IDE.
I think whatever you put in either or will work as long as you included them as described.

Specs[1 GiG Athlon,Geforce Ti4, 128mb]
Ratty Rat
22
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 23rd Feb 2004 12:29
Just keep in mind when sharing source code files that changes you make in one project will then affect the other, sometimes in ways you might not want.
Like adding a parameter in a shared function, you need to remember to change all the calls to that function in all projects that call it.

"Don`t try to engage my enthusiasm, I don`t have one"
PowerFang
21
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 23rd Feb 2004 16:28
Yeah i'm still on the trial version until my box arrives in the mail.....hopefully if it got sent out 48hrs after i ordered it (theres been a few problems) Then i should get it next week sometime. Until then i have no tutorials but i'll have a look in the options like you said.


Thanks
Wik
22
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 23rd Feb 2004 22:34
If you want to have certain variables for like spped and positions and other things..you need to use the file commands

-open to read
-open to write
-read/write string


PowerFang
21
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 28th Feb 2004 11:52
Ahh yeah good idea

I can make a setup.dat file and let it hold all those values. Forgot about that

Login to post a reply

Server time is: 2025-06-04 03:52:31
Your offset time is: 2025-06-04 03:52:31