Somewhere in my script, I have this code:
Code:
function func_get_uzi(){
if(debug_has_gun == 1){ent_remove(current_weapon);debug_has_gun = 0;debug_tmp = 1;}
muzzledistance = 50;
current_weapon = me;
debug_has_gun = 1;
bullets = 20;
automatic = 1;
pointer1_pan.flags = VISIBLE | OVERLAY;
hand_txt.flags = 0;
hand_pan.flags = 0;
me.scale_x = 0.5;
me.scale_y = 0.5;
me.scale_z = 0.5;
current_weapon.tilt = camera.tilt + 10;
while(1){
current_weapon.x = camera.x + 100;
current_weapon.y = camera.y - 40;
current_weapon.z = camera.z - 30;
vec_diff(temp1,current_weapon.x,camera.x);
vec_set(current_weapon.x,temp1.x);
vec_rotate(current_weapon.x,camera.pan);
vec_add(current_weapon.x,camera.x);
current_weapon.pan = camera.pan + 10;
uzi_icon.flags = VISIBLE | OVERLAY;
wait(1);
}
}
action gun_uzi(){
c_setminmax(my);
weap_uzi = my;
my.emask |= ENABLE_IMPACT;
my.event = func_get_uzi;
while(1){
if(vec_dist(weap_uzi.x,player.x)<120){
debug_gun_range = 1;
hand_pan.flags = VISIBLE;
hand_txt.pos_x = screen_size.x / 2;
hand_txt.flags = VISIBLE | CENTER_X;
}else{
debug_gun_range = 0;
hand_pan.flags = 0;
hand_txt.flags = 0;
}
my.pan = my.pan + 0.5;
wait(1);
}
}
But it gives me a undeclared identifier error at this line:
my.event = func_get_uzi;
'func_get_uzi' undeclared identifier
What can be the problem?