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 / Using functions in includes

Author
Message
pontifex
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Germany
Posted: 27th Sep 2004 02:27
Hi folks,

I continue to find my way through DBpro just with the 10MB demo compiler, so I may ask stupid questions... but:

For a test I made a new project containing 2 files:

inctest.dba

and

myfunctions.dba

But while compiling it, it tells me:

"Parameter for TEXT do not match X,Y,String inside myfunction.dba"

so, here is the myfunction:



and here is the main loop:



Is there anything to know about the "include" function for the compiler I did not consider?

if I replace the var with a constant "string" it works

thanks,
P!

-
it's not my fault...
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 30th Sep 2004 11:23
hrm... i've never really used the #include commands. I always use the ide to include stuff. Mayhaps that's a problem?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Sep 2004 11:34
I have heard the #include in dbp is arsed. I have always used the ide and never had a problem with included modules.


DBP_NETLIB_v1.4.3 DarkTOPIA site coming soon!
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 30th Sep 2004 22:25
I'm an old fashioned crazy person who uses includes. I use them because unfortunately RobK never fixed the absolute file reference bug in Blue IDE.

Am I going mad here or is the string variable (my locstr$) wrong because it comprise two words? Shouldn't it be my_locstr$?

Personally I would try something like:

function myprint(word AS string)
text 10, 10, word
endfunction

I think that should work.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Sep 2004 23:20
yeah, I was thinkin that too, and maybe stop using "function" and "print" as parts of your function/varnames.


DBP_NETLIB_v1.4.3 DarkTOPIA site coming soon!
pontifex
19
Years of Service
User Offline
Joined: 23rd Sep 2004
Location: Germany
Posted: 1st Oct 2004 11:08
hi,

you suppose, that a function called "printimageload()" causes the compiler to freak out?

Well... ehm... where is the logic? Besides, that you are right regarding namespace rules, that should not cause the problem... but I will try

regards
P!


It's not my fault... http://www.url-services.de/

Login to post a reply

Server time is: 2024-09-23 01:25:23
Your offset time is: 2024-09-23 01:25:23