Ah, ok, now I got it. t_guns is a pointer to a WEAPON struct or a an array of WEAPON structs (i.e. a poiner to multiple WEAPON structs following directly on each other in memory). Hence (Basisturret.t_guns)[i] is of type WEAPON. But setup_template_weapon returns a pointer to a WEAPON struct. There you got the incompatible types, namely WEAPON vs. WEAPON*. I guess what you want to have is an array of pointers to WEAPON structs, right? In this case you have to declare it as WEAPON** in the struct definition.


Always learn from history, to be sure you make the same mistakes again...