Hi, sitting on this for 3 hours... and i realy think, that it only can be a BUG.

In this minimalistic code, you can see 2 "BAD" lines.
If one of it is removed, the code work.
Otherwise, together, i get:

Code:
E1513 Crash in ModelAdded



But whats realy crazy: If i set the ModelAdded function to just 1 parameter (ENTITY* ent_added), it works fine too.

Code:
#include <acknex.h>
#include <default.c>

ENTITY* ent;

void ModelAdded(ENTITY* ent_added, STRING* var_val){
	FONT* font1 = "Arial#18b";
	VECTOR* tmp;
	VECTOR* tmp2;
	
	vec_set(tmp.y, tmp2.y); // BAD LINE 1
	
	TEXT* txt = txt_create(1,1); // BAD LINE 2
}

void main()
{
	level_load("level.wmb");
	wait(3);
	
	ent = ent_create("cube.mdl",vector(0,0,0),NULL);
	ModelAdded(ent,"test");
}



Last edited by uniquy; 10/15/09 05:14.