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 / problems with #include

Author
Message
Jack
21
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 19th Aug 2006 19:58
this works:

#include "inc.dba"


this doesn't work:

scr$="inc.dba"
#include scr$

How to avoid this problem?

John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 19th Aug 2006 20:00
Includes are evaluated at compile time, you can't dynamically change an include.

You should use functions instead if you want to use different blocks of code depending on a factor.

In Conclusion you always have to provide an explicit file to include, or add the include files using your favourite IDE.

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com
Jack
21
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 19th Aug 2006 20:17
so it is impossible to include code after compiling the exe.

John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 19th Aug 2006 20:28
Correct.

If you are interested in doing this then have a look at LUA, it lets you dynamically load code.

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com
Jack
21
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 19th Aug 2006 22:37
Quote: "lets you dynamically load code"

DBP code?

John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 19th Aug 2006 22:38
LUA code, but you can call DBP functions e.g. making objects etc

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com
Bmad6
20
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 21st Aug 2006 07:05
I asked this question before, but it never got answered - what DBP functions can you call in LUA? Not all of them, I assume?

Harvard's Law, as Applied to Computers:
Under the most rigorously controlled conditions of pressure, temperature, volume, humidity and other variables, the computer will do as it d*mn well pleases.
John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 21st Aug 2006 11:27
You can call them all with Barnski's plugin, or a subset with Unity.

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com
Bmad6
20
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 21st Aug 2006 14:59
I thought Barnski's didn't do licensed plugins, though?

And, what do you mean, "a subset with Unity"???

Harvard's Law, as Applied to Computers:
Under the most rigorously controlled conditions of pressure, temperature, volume, humidity and other variables, the computer will do as it d*mn well pleases.
John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 21st Aug 2006 20:50
Quote: "I thought Barnski's didn't do licensed plugins, though?"


That's correct, I didn't think Unity did either, but maybe

Quote: "And, what do you mean, "a subset with Unity"???"


David T didn't want to step on DB Pro's toes, so he only added the most usefull commands AFAIK.

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com
Bmad6
20
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 22nd Aug 2006 18:06
Hmmm... somebody e-mail both Barnski and Rob K this thread's link, maybe they can clarify.

Seriously, though, it would be much easier if we knew exactly what commands were available. For example, if I wanted to allow scripts in a game or something, and I put in a small "readme.txt" file to tell scripters what they can add, it would be better to have a command list than:

"Scripts made here can only execute certain commands, which were deemed to be the most useful, but I'm not sure exactly what they are, so just add in a bunch of random command from DBPro without the spaces and see if they work."

Harvard's Law, as Applied to Computers:
Under the most rigorously controlled conditions of pressure, temperature, volume, humidity and other variables, the computer will do as it d*mn well pleases.
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 22nd Aug 2006 19:27
Barnski's builds a list of commands by reading the string tables of the other dlls in the exe.
Licensed dlls don't work because Barnski's dll doesn't know how to read the string tables. If they used the same string table format as normal dlls you could just get the dll from an exe, drop it in your plugins-user dir and use the plugin without buying it.

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
Bmad6
20
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 23rd Aug 2006 20:07
Does that mean that Barnski's plugin can or can't use DBPro's built-in commands - like moving and texturing objects, or doing 2d output, or using the print and text commands?

Harvard's Law, as Applied to Computers:
Under the most rigorously controlled conditions of pressure, temperature, volume, humidity and other variables, the computer will do as it d*mn well pleases.
John Y
Synergy Editor Developer
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 23rd Aug 2006 20:54
Sounds like all of DBP's commands and every free TPC you have

Get the new DarkBasic Professional IDE free until October!
Http://synergyide.thegamecreators.com
Http://omegabasic.thegamecreators.com

Login to post a reply

Server time is: 2026-06-26 15:43:33
Your offset time is: 2026-06-26 15:43:33