Somthing so simple is causing me quite a headache. Iv'e made some functions for adding simple prefabs to a world. However for some reason, the textures are showing up black.

Ive declared two variables (texture0 and texture1) as GLuint.
I then have functions that load and create texture objects, and return int. The file names are read in from a text box created with GLUI.

So, on the creation of an object:
Code:
int type; 
char texfname1[sizeof(GLUI_String)]; 
char texfname2[sizeof(GLUI_String)];

//skip stuff here. texfname1,texfname2,and type are updated by GLUI controls

		if(ctrl==ADDSOLIDCUBE_BTN)
		{
			_cePrefab->createsolidcube(texfname1, texfname2, type,
									   x, y, z,
									   l, w, h,
									   0, 0, 0);
		}
in the create solid cube function I have:
Code:
	if(textype==0)
	{
		prefabP[num_prefabs].texture0 = CreateModelTextureJPG(tex1);
		prefabP[num_prefabs].texture1 = CreateModelTextureJPG(tex2);
	}
	else if(textype==1)
	{
		prefabP[num_prefabs].texture0 = CreateModelTextureDDS(tex1);
		prefabP[num_prefabs].texture1 = CreateModelTextureDDS(tex2);
	}
	else if(textype==2)
		glDisable(GL_TEXTURE_2D);
this is then rendered in this function:
Code:
void prefab::drawsolidcube(pf prefabP, float tscaleX, float tscaleY)
{
	glActiveTextureARB		= (PFNGLACTIVETEXTUREARBPROC)		wglGetProcAddress("glActiveTextureARB");
	glMultiTexCoord2fARB	= (PFNGLMULTITEXCOORD2FARBPROC)		wglGetProcAddress("glMultiTexCoord2fARB");

    float size = 0.5f;

#define V(a,b,c) glVertex3f( a size, b size, c size );
#define N(a,b,c) glNormal3f( a, b, c );
#define T0(s,t) glMultiTexCoord2fARB(GL_TEXTURE0_ARB, s, t);
#define T1(s,t) glMultiTexCoord2fARB(GL_TEXTURE1_ARB, s, t);

	if(prefabP->texture0!=NULL)
	{
		glActiveTextureARB(GL_TEXTURE0_ARB);
		glEnable( GL_TEXTURE_2D );
		glBindTexture( GL_TEXTURE_2D, prefabP->texture0 );
		glActiveTextureARB(GL_TEXTURE1_ARB);
		glEnable( GL_TEXTURE_2D );
		glBindTexture( GL_TEXTURE_2D, prefabP->texture1 );
	}
	else
		glDisable(GL_TEXTURE_2D);
	
    glBegin( GL_QUADS );
	N( 1.0, 0.0, 0.0); 
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(+,-,+); 
	T0(0*tscaleX,0*tscaleY);T1(0,0);V(+,-,-); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(+,+,-); 
	T0(1*tscaleX,1*tscaleY);T1(1,1);V(+,+,+);
	
	N( 0.0, 1.0, 0.0);
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(+,+,+); 
	T0(1*tscaleX,1*tscaleY);T1(1,1);V(+,+,-); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(-,+,-); 
	T0(0*tscaleX,0*tscaleY);T1(0,0);V(-,+,+);
	
	N( 0.0, 0.0, 1.0); 
	T0(1*tscaleX,1*tscaleY);T1(1,1);V(+,+,+); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(-,+,+); 
	T0(0*tscaleX,0*tscaleY);T1(0,0);V(-,-,+); 
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(+,-,+);
	
	N(-1.0, 0.0, 0.0); 
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(-,-,+); 
	T0(1*tscaleX,1*tscaleY);T1(0,0);V(-,+,+); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(-,+,-); 
	T0(0*tscaleX,0*tscaleY);T1(1,1);V(-,-,-);
	
	N( 0.0,-1.0, 0.0); 
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(-,-,+); 
	T0(1*tscaleX,1*tscaleY);T1(1,1);V(-,-,-); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(+,-,-); 
	T0(0*tscaleX,0*tscaleY);T1(0,0);V(+,-,+);
	
	N( 0.0, 0.0,-1.0);
	T0(0*tscaleX,0*tscaleY);T1(1,1);V(-,-,-); 
	T0(0*tscaleX,1*tscaleY);T1(0,1);V(-,+,-);
	T0(1*tscaleX,1*tscaleY);T1(0,0);V(+,+,-); 
	T0(1*tscaleX,0*tscaleY);T1(1,0);V(+,-,-);
    glEnd();
	
#undef V
#undef N
#undef T0
#undef T1
}
I can't seem to find any reason why it's not working, as I have somthing almost exactly the same written already, which works. however that isn't getting variable data from GLUI, which leads me to beleive the problem might have to do with that, but I can't tell why.

thanx
-psychopath