   Help with ms3d loader
  Hey guys,Before i asked why Brent Porter's MS3D loader wasn't showing the textures. I was told that it is was becasue of absolute directories for the textures, or something like that. I was then told that i should change the loader accordingly, so that this does not happen. But how can i do this?? I don't even have a vauge idea. It would help alot if someone could show me. If neccesary, i can email the source code to somone who wants to fix it.ThanksMike   
  Taken from Brett's Source code is the loop which will load the materials:[SOURCE]for ( i = 0; i < nMaterials; i++ ){MS3DMaterial *pMaterial = ( MS3DMaterial* )pPtr;memcpy( m_pMaterials.m_ambient, pMaterial->m_ambient, sizeof( float )*4 );memcpy( m_pMaterials.m_diffuse, pMaterial->m_diffuse, sizeof( float )*4 );memcpy( m_pMaterials.m_specular, pMaterial->m_specular, sizeof( float )*4 );memcpy( m_pMaterials.m_emissive, pMaterial->m_emissive, sizeof( float )*4 );m_pMaterials.m_shininess = pMaterial->m_shininess;if ( strncmp( pMaterial->m_texture, ".\\", 2 ) == 0 ) {// MS3D 1.5.x relative pathstrcpy( pathTemp + pathLength, pMaterial->m_texture + 2 );m_pMaterials.m_pTextureFilename = new char[strlen( pathTemp )+1];strcpy( m_pMaterials.m_pTextureFilename, pathTemp );}else {// MS3D 1.4.x or earlier - absolute pathm_pMaterials.m_pTextureFilename = new char[strlen( pMaterial->m_texture )+1];strcpy( m_pMaterials.m_pTextureFilename, pMaterial->m_texture );}pPtr += sizeof( MS3DMaterial );}[/SOURCE];  i think this should do the trick.if ( strncmp( pMaterial->m_texture, ".\\", 2 ) == 0 ) {// MS3D 1.5.x relative pathstrcpy( pathTemp + pathLength, pMaterial->m_texture + 2 );m_pMaterials.m_pTextureFilename = new char[strlen( pathTemp )+1];strcpy( m_pMaterials.m_pTextureFilename, pathTemp );}else {// MS3D 1.4.x or earlier - absolute pathm_pMaterials.m_pTextureFilename = new char[strlen( pMaterial->m_texture )+1];strcpy( m_pMaterials.m_pTextureFilename, pMaterial->m_texture );}found this code in an old MS3D anim tutor by Brett Porter.// FredrikEDIT: Beat me to it Nit;  Well, i copied and pasted what you wrote there, exactly. What should be I got 2 errors when compiling'pathTemp' undeclared'pathLength' undeclared;  You were also told that there's a newer version on his site that fixes this problem.   ;  If you want to look at Brett's full (and updated) source code, clicky:http://rsn.gamedev.net/files/ms3danim.zip;  Ok.Not to be a pain, but here's what happened - when i tried to run the .exe it said that it encountered an error, and will now close. I thought that was kind of wierd. So i tried again. Same thing. Ten more times i tried, then i restarted my computer and tried again, it did the same thing :( . Any idea what's going on?   ;  Have you tried this one?http://rsn.gamedev.net/files/lesson31_new.zipAnd here it is in action using a .jpg and a .bmp texture (the helichopper)[Edited by - DrewGreen on December 12, 2005 6:15:35 PM];Quote:Original post by DrewGreenHave you tried this one?http://rsn.gamedev.net/files/lesson31_new.zipAnd here it is in action using a .jpg and a .bmp texture (the helichopper)Ok, Excellent!!!! The ms3d loader is working!Just one thing - the "ms3d anim" is still saying that it encountered an error and will now close   ;  So what do i do now?   