error messages and trouble shooting

I have been struggling with the error message that is ‘data’ was not declared in this scope.
I have been working at this problem for hours now and for the life of me I just cannot find the issue. I don’t know if I am just missing something very simple or not but I really would like someones help with this. My code is here-

#include<Servo.h>

Servo serX;
Servo serY;

String serialData;

void setup() {
serX.attach(10);
serY.attach(11);
Serial.begin(9600);
Serial.setTimeout(10);
}

void loop() {

}

void serialEvent(){
serialData = Serial.readString();

serX.write(parseDataX(serialData));
serY.write(parseDataY(serialData));
}

int parseDataX(String date) {
data.remove(date.indexOf(“Y”));
data.remove(data.indexOf(“X”), 1);

return data.toInt();
}

int parseDataY(String date) {
data.remove(0, data.indexOf(“Y”) + 1);

return data.toInt();

}

If someone could please help me with my issue that would be greatly appreciated

thank you

The parameter you pass has the name "date" and not "data". Since you used date and data with the same things, this is prob. your problem.

Did you really worked on this problem for hours? It is a typo man...

dr-o:
It is a typo man...

If this is true (I think so), the typo also appears in more than one place.