Only A1 pin working on very specific code

When I use this code, all analog pins are working if I change the A2 value:

void setup() {

  Serial.begin(9600);
}
void loop() {
  int sensorValue = analogRead(A2);
  Serial.println(sensorValue);
  delay(1000);
}

However this nearly identical code only reads values on A1 no matter what pin I change to in the code:

int fsrReading;

void setup() {
  Serial.begin(9600);
}
void loop() {
  fsrReading = analogRead(A2);
  Serial.print("Analog reading = ");
  delay(1000);
}

What I mean is, arduino will only read from analog pin 1 regardless of what pin I set it to analog read from.

In the second code how would you ever know because you never print the value you read.

Delta_G: In the second code how would you ever know because you never print the value you read.

Fixed that still doesn't work

int fsrReading;

void setup() {
  Serial.begin(9600);
}
void loop() {
  fsrReading = analogRead(A0);
  Serial.println(fsrReading);
  delay(1000);
}

What do you mean it doesn't work? What is connected to that pin? What does it print? What did you expect to see?

I don't expect that code to compile. sensorValue isn't defined. You read into one variable but try to print another that doesn't exist.

Slow down. Copy the actual code from the IDE and try to explain the problem.

This code takes readings from A1 and shows the correct values on serial monitor, although I have set it to analogRead from pin A2. Setting analogRead to pin A3 will show values in the serial monitor for pin A1

int fsrReading;

void setup() {
  Serial.begin(9600);
}
void loop() {
  fsrReading = analogRead(A2);
  Serial.println(fsrReading);
  delay(1000);
}

This code is set to analogRead from pin A2 and it writes the correct values in the serial monitor. Setting analogRead to A3 it will read from pin A3

void setup() {

  Serial.begin(9600);
}
void loop() {
  int sensorValue = analogRead(A2);
  Serial.println(sensorValue);
  delay(1000);
}

I can figure out why the first code works and the second code doesn't

You didn’t answer all the questions I asked.

What is connected to the analog pins?

What are you seeing in the serial monitor that makes you think it reads from the wrong pin?

I have an fsr Restarting the IDE fixed it somehow.