In case someone wants to use the other script , I made another mistake , here is the solution...
PS.: I havent used vec_for_screen lately so I forgot how it worked

the view has to be after the vector , not before... So , not tested , but this code should work now without errors.
Code:
var temp1[3];
var temp2[3];
temp1.x = 512; // middle x pos of screen
temp1.y = 384; // middle y pos of screen
temp1.z = 1; // scan starting 1 quant infront of camera
vec_set(temp2.x,temp1.x);
temp2.z = 10000; // trace range infront of camera
vec_for_screen(temp1.x,camera); // convert to world coords
vec_for_screen(temp2.x,camera);
c_trace(temp1.x,temp2.x,ignore_me + ignore_passable);
if(you) { vec_set(temp1.x,my.x); vec_set(my.x,you.x); vec_set(you.x,temp1.x); }