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.

Author
Message
klukk
23
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Iceland
Posted: 14th Feb 2003 02:12
First of I'm gonna start with the now-useal rant about the need for a search functionality on the forums Probably gonna join the "edit" camp too, as soon as I make my first posting error

Now that's out of the way, on to the question:

What are the limitations of include files inthe current version of DBPro?

I'm trying to separate my retro gaming competition code into files (AI code into one, collectibles code into one etc) and am having a really hard time doing it. Types declared in one file don't work in another, same with globals (aren't global except on the main file) and so on......

Am I missing something or are these just limitations of DBPro?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Feb 2003 07:19
The only problems that I have had recently is with arrays defined within included files. Everything else seems to work OK for me.
Hubdule
23
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 14th Feb 2003 09:37
Put the Array defines in a sub like:

Init_vars:
Global blabla
BlaBla=100

Dim ABC(1000)
Return

and call this as your first statement in your source then these declarations also work within include files ...

Hubdule
23
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 14th Feb 2003 09:38
just use

Gosub Init_vars

I wanted to add ... we definitly need a "edit" function

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Feb 2003 21:06
Thats what I do, but I've reported it as a bug to lee anyway. If you can define an array outside of a function in an included file then it should be usable.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 14th Feb 2003 22:43
This is, I believe, on the fix list for Patch 4.

NOBODY has a forum name as stupid as Darth Shader. I do.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Feb 2003 22:55
Nope. I know for a fact it isn't fixed. I'm on DBDN.

Login to post a reply

Server time is: 2026-07-21 17:43:21
Your offset time is: 2026-07-21 17:43:21