Hi,
I don't get this. I have a very semple if statement here.
I keep getting and error (undeclared identifier)

here the code:
Code:

#include <acknex.h>
#include <default.c>




function canera_state();
function cam_walking();
var campla = 1;

function main()
{
	video_screen = 1;
	video_mode = 7;
	level_load ("place.wmb");
        ent_create("ship.mdl", vector(0,0,0),NULL);
	
	while(1)
{
	IF (campla==1)
     {

     	canera_state();
     
     
   else
   
     if(campla == 0) 
    cam_walking();
   }


   if (key_a){campla=1;}
   if (key_b){campla=0;}
   wait(1)
	

     
   
} 




function canera_state()

{
	vec_set(camera.x,ship.x);
  vec_set(camera.y,ship.y);
  vec_set(camera.z,ship.z);// move the camera together with the ship entity
  vec_set(camera.pan,ship.pan);
  wait(1)
	
	
}



function cam_walking()

{
	
vec_set(camera.x, vector(-300, 0, 20));	
	
	
}




I have the var set for campla to 1, I should be able to go from one camera pos. to a nother by using the a and b keys.
Well if anyone know what I did wrong here let me know.


I have A7 Commercial .............. Now I just need to learn how to use it