Posted: 24th Jun 2007 23:12
Hi, I'm trying to remember the code that will let you load up a separate dbpro file from within a program allowing you to go to a whole different set of program. I know it can be done and it's just a one line code but I cant seem to remember it. It was done in the source code of the ommorpg project and I've even used it in my own projects but that was long ago.

I have the other file loaded up in the files section I just need to know the syntax to transfer it.

Thanks
Posted: 24th Jun 2007 23:14
Are you taking about '#include' command? If so, don't use, look at this:

http://forum.thegamecreators.com/?m=forum_view&t=99062&b=1
Posted: 24th Jun 2007 23:22
In DB Pro, you don't #include. You add additional dba files using the editor.


That's a better explanation of what I'm trying to do. Add additional dba files using the editor. In fact, I've already done that, I am just wondering how to access them.

And thanks for the quick reply!

[Edit] That thread really helped! This picture explains it perfectly:



It turns out if I load for example: cool.dba then to execute it I would simply put cool(). Wow I feel dumb! Thanks
Posted: 24th Jun 2007 23:28
I was about the upload that picture again then you edited, lol.
Posted: 24th Jun 2007 23:32
Lol. Yeah, now I'm having a problem. I have the file loaded in the files section, and I put 'menu()' and it says it doesnt understand the code. I must be doing something wrong

[Edit]
Problem solved, I see I have to treat it as just a function or gosub. It works perfectly now thank you very much!
Posted: 24th Jun 2007 23:46
Don't thank me, you did the work.