errors in my script

Hi, I’m in the process of creating a submit button that will check for a certain placing order, here I’ve place a portion of my code.
this is the errors that I’m getting. (Please view the attachments)

line 17 expecting ;, found ‘k’. (BCE0044)
Line 17 Unexpected token: ). (BCE0043)
Line 18 Unexpected token: for. (BCE0043)
Line 18 expecting ), found ‘l’. (BCE0044)
Line 18 Unexpected token: ). (BCE0043)
Line 19 Unexpected token: if. (BCE0043)
Line 19 ‘;’ expected. Insert a semicolon at the end. (UCE0001)
Line 20 Unexpected token: if. (BCE0043)
Line 20 ‘;’ expected. Insert a semicolon at the end. (UCE0001)
Line 21 Unexpected token: if. (BCE0043)
Line 21 ‘;’ expected. Insert a semicolon at the end. (UCE0001)
Line 23 expecting EOF, found ‘}’. (BCE0044)

#pragma strict
function signal(cij,ckl){
		if(ckl==cij-1) return 0;
		else if(ckl==cij+1) return 0;
		else return 1;

}
function coupleAction(i,j){
		//out layer
		if((i==0)(j==0)) return 0;
		if((i==0)(j==3)) return 0;
		if((i==2)(j==0)) return 0;
		if((i==2)(j==3))return 0;
		return 1;
	}
	function check(box,i,j){
		for(int k=i-1;k<=i+1; k++){
			for(int l=j-1;l<=j+1; l++){//range
				if(((k>=0)(k<=2))((l>=0)(l<=3))){
					if((coupleAction(k,l)==1)(!((k==i)(l==j)))){
						if(signal(box[i][j],box[k][l])==0) return 0;
					}
				}return 1;
			}
	function submit(cube){
	for(int i=0;i<3; i++){
		for(int j=0;j<4; j++){
			//out layer
			if((i==0)(j==0)) continue;
			if((i==0)(j==3)) continue;
			if((i==2)(j==0)) continue;
			if((i==2)(j==3)) continue;
			
		if(check(cube,i,j)==0) return 0;
		}
	}
	return 1;
	}
}
var cube[][];
submit(cube);

1601141–96673–$Errors.pdf (27.1 KB)

I’m not too familiar with javascript but I think you need to change ‘int’ to ‘var’ in your for loops.

Check your brackets, your function function check(box,i,j){ doesn’t seem to have a closing bracket.
I don’t use javascript, but it seems that your syntax is not correct.

As a tip, most of the time, if you miss a } mono will auto indent your lines. If they are not lined up correctly, it means that you have made a mistake somwhere.

laurelhach is correct. You’re actually missing 2 closing brackets. 1 for the outer for loop and 1 for the function.