Serial Monitor not showing anything

I am using an Arduino Nano, and it says that the code is working fine. But, the serial monitor does not show any data. I need this done by monday

onst int joystick1X = A0;
const int joystick1Y = A1;
const int joystick2X = A2;
const int joystick2Y = A3;
const int button1 = 5;
const int button2 = 4;
const int button3 = 3;
const int button4 = 2;

void setup() {
  Serial.begin(9600);
  pinMode(button1, INPUT_PULLUP);
  pinMode(button2, INPUT_PULLUP);
  pinMode(button3, INPUT_PULLUP);
  pinMode(button4, INPUT_PULLUP);
}

void loop() {
  int joy1X = analogRead(joystick1X);
  int joy1Y = analogRead(joystick1Y);
  int joy2X = analogRead(joystick2X);
  int joy2Y = analogRead(joystick2Y);

  int btn1 = digitalRead(button1);
  int btn2 = digitalRead(button2);
  int btn3 = digitalRead(button3);
  int btn4 = digitalRead(button4);

  Serial.print("Joystick 1: X=");
  Serial.print(joy1X);
  Serial.print(" Y=");
  Serial.print(joy1Y);
  Serial.print(" | Joystick 2: X=");
  Serial.print(joy2X);
  Serial.print(" Y=");
  Serial.print(joy2Y);

  Serial.print(" | Buttons: ");
  Serial.print(btn1);
  Serial.print(" ");
  Serial.print(btn2);
  Serial.print(" ");
  Serial.print(btn3);
  Serial.print(" ");
  Serial.println(btn4);

  delay(100);
}

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post error messages in code tags as it makes it easier to scroll through them and copy them for examination

What baud rate have you got the Serial monitor set to ?

9600

Please turn on verbose output for compile and upload in the IDE preferences then upload your sketch and post the full output from the bottom section of the IDE, using code tags when you post it

It's working now, thank you!!

What was the problem ?

It's because the verbose output for compile wasn't turned on

No that was not the problem. Turning on the verbose output would not have changed anything. It would only have allowed you to see an error and then fix it.

So what was the error you spotted and how did you fix it?

As Mike says, that was not the problem or the solution

Hahaha, best thread this week

I'm sorry, I'm new to this kind of stuff. The serial monitor was simply not showing anything, and just needed assistance in making it work just like the image I showed

Yes but we are not, and we know that it was not the solution.

So you did something that you don't know you did. So it looks like your "solution" is a bit of a red herring, for anyone reading this thread.