I realized something when i solved this problem. If the name of the model is longer than 8 characters, the model type must be set 7.

A similar code can be used.

Code:
str_for_entfile(tempstr,you);
				
if(str_len(tempstr)>12)//model name+4character for ".mdl"
{
yourtype+=1;// or whatever you want to use		
}



and there is no need put "ndef" for material if type is 7. So just close the line;

Code:
if(yourtype>0)
{

	file_var_write (wmb_handle,your.albedo);skipline;
	file_var_write (wmb_handle,0);skipline;//path
	file_var_write (wmb_handle,0);skipline;//attach
	//file_str_write (wmb_handle,"ndef"); skipline; // if no material put ndef
}