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 / Code Sections

Author
Message
Ryan450
22
Years of Service
User Offline
Joined: 7th Aug 2003
Location:
Posted: 9th Aug 2003 19:44
hey guys,

The Game I'm making is getting quite lengthy, and all and all looking at my sourcode is getting to be a little overwhelming.. is there anyway i can divide my sourcecode into pieces?? i have a section of code that is for my shop, and another section of code that my battle system runs off.. is there anyway I can save my shop code into it's own .dba file which the main loop can load and close?
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 9th Aug 2003 20:43
Yes...




You are the th person to view this signature.
GRAVITY: I fought the law but the law won
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 10th Aug 2003 00:29
Yes,
in main program, use:

#include "whatever.dba"

e.g.

main proggy:



sub.dba



Also, click 'Files' in editor, and browse or add new .dba files. They then get listed in that drop-down selector at top of editor for easy editing of multiple files at once.

There are some complicated rules about multi-file projects but I don't know what they are. Mostly about arrays and global variables.

All of this is only important of course if you are running DBPro!

The programmer formerly known as sonic

Login to post a reply

Server time is: 2026-07-06 10:32:38
Your offset time is: 2026-07-06 10:32:38