Hi folks,
I´m translating a large old C-script project into the new Lite-C engine language, and stumbled into a problem.
The engine error says that 'pan' is not a part of 'function', and points to the following line:
Code:
vec_to_angle(npc1_dir.pan,temp_npclookatplayer);


I´ve used several angle functions in the last scripts of the same project, and the engine never complained.
The npc1_dir was a VECTOR when it was declared earlier, and i changed it to a VAR, but to no avail.
The use inside vec_to_angle is the same in all the manual examples! What´s wrong?
Here´s the code:
Code:
function NPC_LOOKATPLAYER()
{
 VECTOR* temp_npclookatplayer;
temp_npclookatplayer.x=player_A.x-my.x;
temp_npclookatplayer.y=player_A.y-my.y;
temp_npclookatplayer.z=0;
vec_to_angle(npc1_dir.pan,temp_npclookatplayer);
if(my.pan>npc1_dir.pan+10||my.pan>npc1_dir.pan-10){vec_to_angle(my.pan,temp_npclookatplayer);}
if(my.pan<npc1_dir.pan+10||my.pan<npc1_dir.pan-10){vec_to_angle(my.pan,temp_npclookatplayer);}
wait(1);
}


Any help is appreciated... thanks in advance.