Advertisement

little help needed - milkshape loading and strings

Started by May 02, 2002 05:14 PM
1 comment, last by llvllatrix 22 years, 9 months ago
Im trying to create a function that reads a bunch of file paths to milkhshape models from a text file and loads them using the milkshape loading routine (look at rsn.gamedev.net). Unfortunately the load of the milkshape model is failing. I think its because of the strings formating but im not sure. I tried this to undo the formatting: char * string; int i = strlen(modelFilename); string = (char *)malloc(sizeof(char) * i); if (string == NULL) { MessageBox( NULL, "Insufficient memory", "Error", MB_OK | MB_ICONERROR ); pModel = NULL; delete(pModel); return(false); } _mbsnbcpy( (unsigned char *)string, (unsigned char *)modelFilename, sizeof(char) * i); but still nothing. Anyone know why the models arn''t loading?
I have a problem with pathloading as well. The cause in my code is that the "/0" end of line character is in the pathstring as well. This makes the path invalid. Maybe you have the same problem.

I haven''t been able to fix it however (lack of time and sleep).

- An eye for an eye will make the world go blind -

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

Advertisement
i tell you what i figure out

This topic is closed to new replies.

Advertisement