TTimer won't allow existence of TTimer2?

BlitzMax Forums/BlitzMax Beginners Area/TTimer won't allow existence of TTimer2?

Htbaa(Posted 2008) [#1]
I have my own module directory, htbaa.mod, in which I keep my hand crafted modules.

I've also written a timer module which contains a type called TTimer2. The modules name is timer.mod and resides in htbaa.mod.

However, when I include htbaa.mod/timer.mod I cannot do a call to CreateTimer or create a TTimer object. It gives me this error:

C:/Program Files/BlitzMax/mod/brl.mod/timer.mod/timer.debug.win32.x86.a(timer.bmx.debug.win32.x86.o): multiple definition of `__bb_timer_timer'
Build Error: Failed to link C:/test/test.exe


Any idea what the hell is going on here? My own timer.mod doesn't define a TTimer type, only TTimer2. I use it to get framerate independent movement.


Brucey(Posted 2008) [#2]
It's a "feature" of BlitzMax internal module naming conventions, which means you cannot use two modules with the same name, even though they are in different name spaces... alas.

You would use one or the other, but not both at the same time.


Htbaa(Posted 2008) [#3]
But my type is called TTimer2. Or is it because the module itself is being called timer.mod?
If that's the problem then I can just rename it.


Brucey(Posted 2008) [#4]
Yeah, try renaming the module...