So, now I have the following code:

Code:
function move() {
	if(arm01) {
		wait(-1);
	} else if(arm02) {
		wait(-2);
	} else if(arm03) {
		wait(-3);
	} else if(arm04) {
		wait(-4);
	} else if(arm05) {
		wait(-5);
	}
}

action arm1 {
	arm01 = my;
	my.passable = on;
	
	vec_for_vertex(temp,my,86);
	ent_create("ZTkrzn.mdl",temp,kruis1);
	
	var anim_time = 0;
	var anim;
	
	ang_sin = 0;
	speed_arm = 0.3;
	max_arm = 0;
	
	//wait(-1);
	move();
	
	while(1) {
		vec_for_vertex(temp,ondermolen1,259);
		
		my.x = temp.x;
		my.y = temp.y;
		my.z = temp.z;
		my.pan = ondermolen1.pan;
		
		ent_animate(my, "windmill", anim, ANM_cycle);
		anim += anim_time;
		anim_time = 2*time_step;
		
		if(key_r == 1) {
			if(max_arm <= 8) {
				max_arm += 0.1*time_step;
			}
		}
		if(key_f == 1) {
			if(max_arm > 0) {
				max_arm -= 0.1*time_step;
			}
		}
		
		ang_sin += speed_arm;
		if(ang_sin >= 360) {
			ang_sin += 360;
		}
		
		my.tilt = -max_arm+sin(ang_sin) * max_arm;
		
		wait(1);
	}
}

But when I want to test my game I have these errors:

"else if(arm03){" <- Parameter unknown else bad keyword in {}

and this one:
"wait(-3)" <- Parameter unknown wait bad keyword in {}

How can I fix this?