Imposible!: duplicate identifier

BlitzMax Forums/BlitzMax Programming/Imposible!: duplicate identifier

christian223(Posted 2008) [#1]
"Compile Error: Duplicate identifier" says the compiler, but thats imposible, i have this imported files: (parentesis and {} are there for visual help)

-> ("TGamestateGameplay.bmx") is in "T_Boton_Terminar_Nivel.bmx"

->{"T_PantallaEndLevel.bmx"} is in "GameplayObjects.bmx"

-> "GameplayObjects.bmx" is in ("TGamestateGameplay.bmx")

-> The problem is here, if i dont import : "T_Boton_Terminar_Nivel.bmx" in {"T_PantallaEndLevel.bmx"} there is no problem, but when i do the problem arises. I have no duplicate types on different files as the compiler tries to make me believe.

I have spent 3 days in this and i still dont find the problem, please help.


ziggy(Posted 2008) [#2]
You've done ciclic imports:
10 T_Boton_Terminar_Nivel.bmx  imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:  --> ciclic imports start here:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:
      TGamestateGameplay.bmx imports:
         GamePlayObjects  imports:
            TPantallaEndLevel  imports: 
               T_Boton_Terminal_Nivel imports:




christian223(Posted 2008) [#3]
I see, i thought i could do that if i didnt do it so obvious, like A in B and B in A, so it doesnt work with more files either, ok, thanks a lot.


Russell(Posted 2008) [#4]
XInclude would be useful here (only import the specified code once, no matter what).

Russell