ID:179346
 
I'm confused about the relation between the external DMs and the main one. When I create a proc in the, "Bla.dm" for example called Do_Something(), in the main module, nether Do_Something() nor Bla.Do_Something() works! Yes I tried including the external AM manually in the main file... Anyone have a clue? I'd hate to have to code everything in one file :)
Dreq wrote:
I'm confused about the relation between the external DMs and the main one. When I create a proc in the, "Bla.dm" for example called Do_Something(), in the main module, nether Do_Something() nor Bla.Do_Something() works! Yes I tried including the external AM manually in the main file... Anyone have a clue? I'd hate to have to code everything in one file :)

Are you clicking the checkbox next to the file in the file view? That causes the file to get included.

I use dozens of .dm files in my games, so there is definitely no need to use just one file.
Make sure the boxes are checked. I like to use different code files for different parts of my program, and I know it's possible.
In response to Lord of Water
Yes I am absolutely sure the boxes are checked...

Do I just say in like Special.dm:
proc
Something(var/T)
world << T


And in my main code, i can say
something("Hi!")
and get that output?
In response to Dreq
Dreq wrote:
Yes I am absolutely sure the boxes are checked...

Do I just say in like Special.dm:
> proc
> Something(var/T)
> world << T
>

And in my main code, i can say
something("Hi!")
and get that output?

you are making it harder than it is.

if you have ever programmed in VB, you have heard of public functions and subs? as well as public variables? Dream Maker has no concept of such things, everything is public. Meaning if you write a proc or a atom or a proc or whatever in one code file, its avialable throughout the entire code, no matter the file.

FIREking