Multiple file source, file library not working

Hey i am creating a portable data logged CO sensor with lcd and push button I/O interfaces.
I am having trouble with using seek();, peek() and the other SD functions in a while loop

// POSITION R/W POINTER TO LAST READ DATA
int off_SD(File f) {
unsigned long x; int y = 6; int pos = 0;
bool t;
// f = SD.open(file_ptr1, FILE_READ);
//x = f.size();
Serial.print(“X: “); Serial.print(String(x)); Serial.println(””);
while ((y >= 0) && (pos < p)) {
x = x - 1;
t = f.seek(x);
Serial.print(“T: “); Serial.print(String(t)); Serial.println(””);
nw[y] = f.peek();
// Serial.print(" Y: “);Serial.print(y);Serial.println(”");
Serial.print(“X: “); Serial.print(x); Serial.println(””);
Serial.print(“NW: “); Serial.print(nw); Serial.println(””); delay(2000);
/
let(file1, pos, y);
switch (y) {
case 6: if (nw[y] == ‘>’) {
y–;
} break;
case 5: if (nw[y] == ‘A’) {
y–;
} break;
case 4: if (nw[y] == ‘T’) {
y–;
} break;
case 3: if (nw[y] == ‘A’) {
y–;
} break;
case 2: if (nw[y] == ‘D’) {
y–;
} break;
case 1: if (nw[y] == ‘/’) {
y–;
} break;
case 0: if (nw[y] == ‘<’) {
x = (p - pos + 7);
chk = 2;
y–;
} break;
default: y = 0; break;
}
pos++;
}
// f.close();
return x; //delay(3000);
}
// POSITION R/W POINTER TO LAST READ DATA

I am having trouble with using seek();, peek() and the other SD functions in a while loop

Bummer. Maybe if we knew what trouble you were having, we could offer more than sympathy.