Original Post
Hey guys - I'm in VB6 (but everything should be just about the same [except for some minor syntax] with other languages). I'd like to compare two things that are types (specifically two D3DMATERIAL8s) in an If-Then statement to prevent unneccessarily replicating them within my game engine. So I have:
If Material1 = Material2 Then... But when I go to run it, VB highlights the = sign and says "Type: mismatch", even though the are of the same type, D3DMATERIAL8. I AM, however, allowed to copy Material1 to Material2 like Material2 = Material1 I tried using "Is" as well to no avail. So I assume this is a problem that exists beyond just the Material types. I guess you can't compare ANY types then without comparing their individual elements separately? The D3DMATERIAL8 types are composed of D3DCOLORVALUE types, which themselves are composed of Singles. Maybe I can't compare the types because the types themselves are made up of other types? So, bottom line: Is there a way I can compare types without comparing each of their individual elements? Why isn't this working and why am I getting a mismatch? Thanks! Much obliged, - Steve.