Smoothing Multiple analog inputs

I am doing a project where I am using 6 flex sensors to control servo motors in a prosthetic hand. I need to smooth the analog inputs with an array. I successfully was able to smooth one input but everytime I try to do multiple it just does not work. A launching point for this code would be super helpful. // Define the number of samples to keep track of. The higher the number, the
// more the readings will be smoothed, but the slower the output will respond to
// the input. Using a constant rather than a normal variable lets us use this
// value to determine the size of the readings array.

Below is a copy of the code as we currently have it. I keep getting int[int] errors in the piece directly after void loop.

const int numReadings = 50;
const int numChannels = 2;

int readings[numChannels][numReadings]; // the readings from the analog input
int index; // the index of the current reading
int total [numChannels]; // the running total

int average [numChannels];
// the running total

const int analogOutPin = 9;
const int analogOutPin1 = 10;
int inputPin = A0;
int inputPin1 = A1;
int sensorValue = 0; // value read from the pot
int outputValue = 0;
int sensorValue1 = 0;
int outputValue1 = 0;

void setup(){

// initialize serial communication with computer:
Serial.begin(9600);
}

void loop() {
for (int chan = 0; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin [chan]);}

for (int chan = 1; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin [chan]);}

// map it to the range of the analog out:
outputValue = map(average, 0, 630, 0, 255);
outputValue1 = map(average1, 0, 1023, 0, 255);
// change the analog out value:
analogWrite(analogOutPin, outputValue);
analogWrite(analogOutPin1, outputValue1);
// send it to the computer as ASCII digits
Serial.println(average);
Serial.print("sensor = “);
Serial.print(sensorValue);
Serial.print(”\t output = ");
Serial.println(outputValue);
Serial.println(average1);
Serial.print("sensor1 = “);
Serial.print(sensorValue1);
Serial.print(”\t output1 = ");
Serial.println(outputValue1);
// change the analog out value:
delay(1); // delay in between reads for stability

Please post the whole program and the complete error message

// Define the number of samples to keep track of. The higher the number, the
// more the readings will be smoothed, but the slower the output will respond to
// the input. Using a constant rather than a normal variable lets us use this
// value to determine the size of the readings array.
const int numReadings = 50;
const int numChannels = 4;
const int INPUTS = 4;
const byte inputPin[INPUTS] = { A0, A1, A2, A3 };

int readings[numChannels][numReadings]; // the readings from the analog input
int index; // the index of the current reading
int total [numChannels]; // the running total

int average [numChannels];
// the running total

const int analogOutPin = 9;
const int analogOutPin1 = 10;

int sensorValue = 0; // value read from the pot
int outputValue = 0;
int sensorValue1 = 0;
int outputValue1 = 0;

void setup(){

// initialize serial communication with computer:
Serial.begin(9600);
}

void loop() {
for (int chan = 0; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin [chan]);}

for (int chan = 1; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin[chan]);}

for (int chan = 2; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin[chan]);}

for (int chan = 3; chan < numChannels; ++chan) {
total[chan] = total[chan] - readings[chan][index];
total[chan] += analogRead(inputPin[chan]);}

This is the entire project so far. I figure out how to establish the array. Now I am having trouble taking the output of the array and finding the average and then mapping it to a serial out.

If you use ++chan in the for loop then chan will be incremented before it's value is tested. Is that what you want ?

I'm sorry I am not entirely sure what that means. I am attempting to take multiple analog inputs in, then use an array to average, say 25 readings, then use those readings create an average that I can use with the map function.