Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
external sub/function
#1
Hello !

I would like to collect all the sub/functions I have written so far to make a universal 3d engine. I would like sub/function to be in a separate file. attachment. What could be the problem ? it recognizes m_coll.bm, it does not indicate an error there. But it does not recognize the "veletlen" function. why ?


boss-program:
Code: (Select All)
Rem $INCLUDE: 'm_coll.bm'


print veletlen (10)

m_coll.bm (sub/function library)

Code: (Select All)
FUNCTION veletlen (x)
    veletlen = x * RND(1)
END FUNCTION

   
Reply
#2
SUBs and FUNCTIONs go at the end of your code. Move the $INCLUDE from the 1st line to the last line of your program.
Reply
#3
(08-02-2022, 09:40 PM)admin Wrote: SUBs and FUNCTIONs go at the end of your code.  Move the $INCLUDE from the 1st line to the last line of your program.

OMG! Smile I didn't think of that! It already works!

Thanks for the answer and the speed!
Reply




Users browsing this thread: 1 Guest(s)