hi,everyone.
im a newbie in game industry and no one is intructing me in the company,but many thanks to Semicolon's help
i got one problem today,,when i export my mesh and i got this error:
type error:to: requires character stream,got " "
what does this mean?
waht should i do for this??
thanksssssssssssssssss
hihi~
-
aznlz
- Gnoblar
- Posts: 9
- Joined: Fri Apr 08, 2005 9:53 am
- Contact:
format "You are using in your mesh a material Id (%) that does not exist in your MultiMaterial (%)\nMaterial information won't be properly exported." matId submatname to:msg ;
as above,what's wrong of my character?
what i did is..i had around 6 individual mesh but i attached all of them together by select a main mesh and attached the rest in it's element mode, after this,i applied right away a multiple/subobject material in this main mesh which is the only one is the scene, and then i select polygons for setting matID,i got around 9 mat ID for whole character, i use OGRE material for each matID, so i tried it again to exported, but i got this msg as above,,,,
does anyone what's going on in my model?
ah,by the way,be4 i attached them together,i did named each mesh as different name for further use.
so when i export i got this msg on popup window,
type error:to: requires character stream,got ""
thank you!
as above,what's wrong of my character?
what i did is..i had around 6 individual mesh but i attached all of them together by select a main mesh and attached the rest in it's element mode, after this,i applied right away a multiple/subobject material in this main mesh which is the only one is the scene, and then i select polygons for setting matID,i got around 9 mat ID for whole character, i use OGRE material for each matID, so i tried it again to exported, but i got this msg as above,,,,
does anyone what's going on in my model?
ah,by the way,be4 i attached them together,i did named each mesh as different name for further use.
so when i export i got this msg on popup window,
type error:to: requires character stream,got ""
thank you!
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
-
aznlz
- Gnoblar
- Posts: 9
- Joined: Fri Apr 08, 2005 9:53 am
- Contact:
- monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
- Contact:
-
aznlz
- Gnoblar
- Posts: 9
- Joined: Fri Apr 08, 2005 9:53 am
- Contact:
-
centipede
- Silver Sponsor

- Posts: 120
- Joined: Fri Nov 14, 2003 10:43 am
- Location: Vinstrup, Denmark
- Contact:
I'm out on a limb here as I haven't been using maxscript for some time, but here goes:
The error you get is because the variable 'msg' is defined badly. BUT the line you quote for failing is most likely just a line that prints an error message. My guess is that the preceding line says something like:
if matId < 0 or matId >= submat.materials.length then print the error message to 'msg'
..I'm just guessing.
Now, what goes wrong is that your model (i.e. the one that you have attached all the other models to, effectively making it a new mesh with reassigned material-ids! contains at least one face whose material-id is bad.
You can't see that in 3DSMax because it silently wraps the material-ids to the number of submaterials of the main material. So if you have 9 submaterials then a mat-id of 9,10,11.. will - when rendered by 3dsmax - appear as the materials 0,1,2...
MaxScript won't do that however. It will complain loudly when you break the boundaries of your submaterial-array, or as in your case stop when some error-checking code detects the problem.
The error you get is because the variable 'msg' is defined badly. BUT the line you quote for failing is most likely just a line that prints an error message. My guess is that the preceding line says something like:
if matId < 0 or matId >= submat.materials.length then print the error message to 'msg'
..I'm just guessing.
Now, what goes wrong is that your model (i.e. the one that you have attached all the other models to, effectively making it a new mesh with reassigned material-ids! contains at least one face whose material-id is bad.
You can't see that in 3DSMax because it silently wraps the material-ids to the number of submaterials of the main material. So if you have 9 submaterials then a mat-id of 9,10,11.. will - when rendered by 3dsmax - appear as the materials 0,1,2...
MaxScript won't do that however. It will complain loudly when you break the boundaries of your submaterial-array, or as in your case stop when some error-checking code detects the problem.
