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 / Calling Functions from different DBP files

Author
Message
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 5th Mar 2007 03:36
I'm working on a space shooter game and I'm developing the engine and trying to test it. The engine is in a separate DBP file and I'm trying to call it from a testLevel file but it doesn't seem to recognize the function. Is there some import statement like java that I need to use? or another method?

"I will work harder... if you ask me enough times... or give me enough coffee"
Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 5th Mar 2007 10:18
I'm no expert in the use of multiple source files (never done it), but you can try with the "#include" command.
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 5th Mar 2007 11:54
Don't use the "#include" command. You add source files using the editor. Functions and gosubs will work then.

In the project manager to the right at the bottom, you'll see a tab called files. Here you can add/create and delete source file. Once you've added or created a source file you'll see the name and location of it appear just below. Along the tool bar next to the last icon is a drop down box. You can switch between source files.

Also, when you save make sure to save all source files. When you load up your project, just click on the files tab again. You'll see all attached files, just click on them to access them.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th Mar 2007 17:33
Gosubs and functions do work with #include...

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 5th Mar 2007 20:01
I never use the #Include command.i hate it

I just include a source file trough Code Surge ide

vibe runner
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: The Future
Posted: 6th Mar 2007 11:02
Use CodeSurge to add new files, but not the default IDE. I've had code chewed (erased) through multiple source files and the default IDE.

Login to post a reply

Server time is: 2024-11-25 22:19:52
Your offset time is: 2024-11-25 22:19:52