analog read/write help

ok i see sorry about that i was thinking thats all that was needed.

int redPin = 11;
int grnPin = 5;
int bluPin = 6;
int potPin = A0;

int sensorValue = 0;
int outputValue = 0;

int black[3] = {255, 255, 255 };
int red[3] = { 0, 255, 255 };
int greenBlue[3] = { 255, 0, 0 };
int purplePink[3] = { 0, 255, 0 };
int tangerine[3] = { 0, 226, 255 };
int lemonLime[3] = { 0, 0, 255 };
int guesswork[3] = { 200,50,250};

int redVal = black[0];
int grnVal = black[1];
int bluVal = black[2];

int fade = 4;
int hold = 1;
int DEBUG = 1;
int loopCount = 60;
int repeat = 0;
int j = 0;

int prevR = redVal;
int prevG = grnVal;
int prevB = bluVal;

void setup()
{

pinMode(redPin, OUTPUT);
pinMode(grnPin, OUTPUT);
pinMode(bluPin, OUTPUT);

if (DEBUG){
Serial.begin(9600);
}
}

void loop()
{

crossFade(greenBlue);
crossFade(purplePink);
crossFade(tangerine);
crossFade(lemonLime);
crossFade(red);
crossFade(guesswork);

}

int calculateStep(int prevValue, int endValue)
{
int step = endValue - prevValue;
if (step)
{
step = 1020/step;
}
return step;
}

int calculateVal(int step, int val, int i)
{
if ((step) && i % step == 0)
{
if (step > 0)
{
val += 1;
}
else if (step < 0)
{
val -= 1;
}
}

if (val > 255)
{
val = 255;
}
if (val < 0)
{
val = 0;
}
return val;
}

void crossFade(int color[3])
{
int R = color[0];
int G = color[1];
int B = color[2];

int stepR = calculateStep(prevR, R);
int stepG = calculateStep(prevG, G);
int stepB = calculateStep(prevB, B);

for (int i = 0; i <= 1020; i++)
{
redVal = calculateVal(stepR, redVal, i);
grnVal = calculateVal(stepG, grnVal, i);
bluVal = calculateVal(stepB, bluVal, i);

analogWrite(redPin, redVal);
analogWrite(grnPin, grnVal);
analogWrite(bluPin, bluVal);

// delay(fade); this is what works and what i put under
// before } is what im working with to control the pot

sensorValue = analogRead(potPin);
outputValue = map(sensorValue, 0, 1023, 0, 500);
delay = analogWrite( redVal, grnVal, bluVal);
}

{

if (DEBUG)
{
if (i == 0 or i % loopCount == 0)
{
Serial.print("loop/RGB: #");
Serial.print(i);
Serial.print(" | ");
Serial.print(redVal);
Serial.print(" / ");
Serial.print(grnVal);
Serial.print(" / ");
Serial.print(bluVal);
}
DEBUG += 1;
}
}
prevR = redVal;
prevG = grnVal;
prevB = bluVal;
delay(hold);
}