Hey,

I'm reading from a text file and I want to define a created entity's action by reading a string but it won't let me I get an engine error (E1513). It's the third parameter in ent_create that fails when I put a string in place of NULL. If NULL is there it runs fine but my entity then has no behaviour.

Code:
		//Place level objects (inc trees)
			file_find(fhandle,"[objects]");
			while(eoo < 1){
				file_str_read (fhandle,tempstr);
				if(str_cmpni(tempstr,"[endobjects]")){
					eoo = 1;
				} else{
					temppos.x = file_var_read(fhandle);
					temppos.y = file_var_read(fhandle);
					temppos.z = file_var_read(fhandle);
					file_str_read(fhandle,tempstr2);
					ent_create(tempstr,temppos,NULL);
				}
			
			}


Here's my text file:
Code:
[objects]
palm.mdl	0	0	250	tree
palm.mdl	100	300	250	tree
[endobjects]