Archived

This topic is now archived and is closed to further replies.

llvllatrix

little help needed - milkshape loading and strings

Recommended Posts

llvllatrix    340
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?

Share this post


Link to post
Share on other sites
Sander    1332
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 -

Share this post


Link to post
Share on other sites