Invalid types 'int[int]' for array subscript error in my Arduino code

Good, now post the complete error message (there's a button to do that right above Arduino IDE's little black window). It will point to the exact line the compiler is complaining about.