I don't know why this type of come in my program expected initializer before 'if'
Your if statements are also incorrect, in your code you're assigning values if(i=1){ rather than testing for them if(i==1){ see Arduino If reference