Archived

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

little help needed - milkshape loading and strings

This topic is 5703 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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