You did put this in a loop, right?

Suggestion for better readability:
Code:
var seen;
seen = 0;
c_scan(player.x,player.pan,vector(90,90,5000),SCAN_ENTS);//switch state is found player
if(you)
	if(you.typ == 1 && you.typ_id == my.typ_id)
		seen = 1;



Always learn from history, to be sure you make the same mistakes again...