Update: EvilSob, I tried your code examples.
this crashes in se7:
Code:
void shieldEffectEnt()
{
	var randID = random(9999);
	logNewValue("shieldEffectEnt", randID, debugLog, OFF);
	logNewValue("my:", my, debugLog, OFF);
	sys_marker("se0");
	set(my,PASSABLE);
	vec_set(my.pan,vector(you.lastHitPan, you.lastHitTilt,0));
	my.flags2 |= UNTOUCHABLE;
	my_playsound(my,shieldHitOGG, volumeMain*volumeFX*500*soundBrightFlash);
	sys_marker("se1");
	my.parent = you;
	sc_ent_shieldImpact(my, getShieldEffectColor(you.shieldEffectType), 15, 1);
	var timePassed = 0;
	while(my != NULL && you != NULL && timePassed < 8)
	{
		sys_marker("se3");
		timePassed += time_frame;
		vec_set(my.x, you.x);
		sys_marker("se4");
		wait(1);
	}
	sys_marker("se2");
	logNewValue("shieldEffectEnt", randID, debugLog, OFF);
	logNewValue("my:", my, debugLog, OFF);
	sys_marker("se5");
	if(my) 
	{
		sys_marker("se6");
		wait(1);
		sys_marker("se7");
		ent_remove(my);	//will also stop sc_ent_shieldImpact
	}
	sys_marker("se8");
}



Last few lines of the log are:
.. .. .. .. .. .. !(debug) shieldEffectEnt: 6173.087891
.. .. .. .. .. .. !(debug) my:: 48872.683594
.. .. .. .. .. .. !(debug) shieldEffectEnt: 4812.445313
.. .. .. .. .. .. !(debug) my:: 49047.691406

.. .. .. .. .. .. !(debug) shieldEffectEnt: 5065.715820
.. .. .. .. .. .. !(debug) my:: 48610.839844
.. .. .. .. .. .. !(debug) recreate started
.. .. .. .. .. .. !(debug) shieldEffectEnt: 3333.101563
.. .. .. .. .. .. !(debug) my:: 48711.035156
.. .. .. .. .. .. !(debug) shieldEffectEnt: 3002.628906
.. .. .. .. .. .. !(debug) my:: 48839.285156
.. .. .. .. .. .. !(debug) shieldEffectEnt: 6456.873047
.. .. .. .. .. .. !(debug) my:: 48880.699219
.. .. .. .. .. .. !(debug) shieldEffectEnt: 2788.721680
.. .. .. .. .. .. !(debug) my:: 48845.964844
.. .. .. .. .. .. !(debug) shieldEffectEnt: 7676.539063
.. .. .. .. .. .. !(debug) my:: 48482.589844
.. .. .. .. .. .. !(debug) shieldEffectEnt: 4812.445313
.. .. .. .. .. .. !(debug) my:: 49047.691406



Edit: funny thing, I get the same error in another function, this causes a script crash in p16:
Code:
if(my != NULL && levelEnded == OFF && disconnectedFromServer == OFF)
		{
			sys_marker("p15");
			if(enet_ent_globpointer(my) != -1)
			{
				sys_marker("p16");
				//	logNewMessage("p14", quickDebugLog, OFF);
				enet_ent_remove(enet_ent_globpointer(my));
			}
		}



Last edited by Germanunkol; 02/29/12 10:58.

~"I never let school interfere with my education"~
-Mark Twain