Beside this problem I have a third big problem. That is the last listed problem until now.
I have a function in the template script called: Camera1stPerson01_Init()
This function contains the call: Camera1stPerson01_Update();
And the second call: Camera1stPerson01_Update_View(view_number);
And the first one looks like that:
function Camera1stPerson01_Update()
{
proc_mode = PROC_LATE;
vec_set(camera1stPerson01_pos_vec,cameraTarget_pos_vec);
vec_set(camera1stPerson01_ang_vec,cameraTarget_ang_vec);
}
I got the error message: W1501 Empty Pointer
And this is defined before:
VECTOR* camera1stPerson01_pos_vec;
ANGLE* camera1stPerson01_ang_vec;
VECTOR* cameraTarget_pos_vec;
ANGLE* cameraTarget_ang_vec;
I have tried it with VECTOR* and VECTOR. Also ANGLE* and ANGLE.
In the original it was a Var[3]
I got also a crash in the second function one second later:
Error E1513: Crash in Camera1stPerson01_Update_View
function Camera1stPerson01_Update_View(view_number)
{
if(view_number == 0)
{
// update main view (camera)
vec_set(camera.x,camera1stPerson01_pos_vec.x);
vec_set(camera.pan,camera1stPerson01_ang_vec.pan);
#ifdef camera1stPerson01_hide_focus_b
//if(1==camera1stPerson01_hide_focus_b)
//{ // hide the target entity from view if inside
//camera.genius = cameraTarget_ent; // camera.genius does not work with new collision
if(cameraTarget_ent != NULL) {
// cameraTarget_ent.invisible = on;
set (cameraTarget_ent, INVISIBLE);
}
//}
#else
//else
//{ // show the target entity no matter what
camera.genius = 0;
//}
#endif
// is this an avatar view?
#ifdef camera1stPerson01_avatar_q
cameraTarget_avatar_view_q = 1;
#else
cameraTarget_avatar_view_q = 0;
#endif
}
Why did I get the meesage for an empty pointer?
I thought vec_set is an easy instruction.
It never made problems in C-Script.
What could be my problem?