Please Help me with error

import java.util.*;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();

	int nsp1 = 6;
	int nst1 = 1;
	int nsp2 = 0;
	int nst2 = 1;
	int val = 1;
	int val1 = 1;
	// Rows
	
	int row=1;
	while(row<=n)
	{
		if(row<=n/2) {
		val = row;}
		else {
			val = n - row + 1;
		}
		
		// Work for space
		for(int csp1 = 1; csp1 <=nsp1; csp1++)
		{
			System.out.print("\t");			
	    }
		
		// Work for star
		for(int cst1 = 1; cst1 <=nst1; cst1++)
		{
			System.out.print(val+"\t");
			val--;
		}
		
		// Work for space
		for(int csp2 = 1; csp2 <=nsp2; csp2++)
		{
			System.out.print("\t");			
	    }
		
		// Work for star
		if(row !=1 && row !=n) {
		for(int cst2 = 1; cst2 <=nst2; cst2++)
		{
			System.out.print(val1+"\t");
			val1++;
		}
	}
		// Preparation
		System.out.println(" ");
		
		if(row<=n/2) {
		nsp1 -=2;
		nsp2 = nsp2 + 2;
		nst1 = nst1 + 1;
		nst2 = nst2 + 1;
        	}
		
		else {
			nsp1 +=2;
			nsp2 = nsp2 - 2;
			nst1 = nst1-1;
			nst2 = nst2 - 1;
		}
		
		row = row + 1;
		val1= 1;


	}
}

}