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 / executing .dba files while in the .exe?

Author
Message
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 20th Jun 2011 01:45
I see how you can have multiple .dba files in a project, but how can i make it to where you run 1.dba and when you press up it will start up 2.dba and start from command line 1?

onhcet d(-_-)b techno
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Jun 2011 08:51
You could have a function in 2.dba and just call that with 1.dba. All multiple files are compiled as if they were all together so it doesn't really matter if you use just one source file or multiple source files.

Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 20th Jun 2011 16:40
but how do i call it? there is only "call dll" and "call dll x" (or something like that.

onhcet d(-_-)b techno
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 20th Jun 2011 17:02 Edited at: 20th Jun 2011 17:04
Like this...

1.dba




2.dba


Hope that helps..

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Jun 2011 17:04
No, afraid not. DBPro compiles all your code, in fact it combines your code first into 1 big source file, then compiles that into a single program.

If you need user level control at a high degree, like say you made an engine, and wanted it to be used for more than one game, you could look into scripting. It's a lot of work, but really it's the only way. There are some tutorials and examples, Phaelax has done a lot of work with script systems, so maybe have a look at the code snippets. There are LUA plugins and stuff like that - personally I like to do it my own way, but it just depends on what you need to do.

Health, Ammo, and bacon and eggs!
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 20th Jun 2011 17:11
bummer, thanks for the help anyways @=PRoF=

onhcet d(-_-)b techno

Login to post a reply

Server time is: 2026-07-10 14:05:06
Your offset time is: 2026-07-10 14:05:06