Using a button to stop a motor

I fixed those two lines of code, yet it still doesn't seem to work. I guess that I will have to wait until you are off mobile. Thanks again.

I was able to look at the Fritzing diagram. I do not know why a 24V power supply is connected to pins labeled 12V. I also do not know how much current is used by the motor, and I do not know how much current can be supplied by the power supply.

Also, please explain in detail in what way your project does not work, and please post your latest code.

I also do not see that the ground of the Arduino is connected to the ground of the motor driver board.

They connect to 24v because that is what the motor needs. the board I have is rated to 35V but for some reason, the Fritzing version only states 12v. The motor attached to the board doesn't spin up at all, which is the issue. Also, what do you mean by, the ground of the Arduino and the motor board not being connected?
The current isn't an issue because I eliminated the motor board and the motor worked fine. Here is the latest code:

void setup()
{
#define SKILL_STOP A0 //For stoping the tray
#define MOTOR_SPEED 3 //PWM output for MOTOR
#define MOTOR_DIRECTION_A 4 //Motor Direction Pin A
#define MOTOR_DIRECTION_B 5 //Motor Direction Pin B
pinMode(SKILL_STOP, INPUT_PULLUP) ;
digitalWrite (MOTOR_DIRECTION_A, HIGH); //confirms motor direction
digitalWrite (MOTOR_DIRECTION_B, LOW); //confirms motor direction
analogWrite (MOTOR_SPEED, 255); //sets the speed when skill stop is not pressed (1 - lowest, 255 - highest)

}

void loop()
{

if (digitalRead(SKILL_STOP) == LOW) //checks button
{
   while (digitalRead(SKILL_STOP) == LOW); //waits for button release
   {
   digitalWrite (MOTOR_DIRECTION_A, HIGH);//confirms motor direction
   digitalWrite (MOTOR_DIRECTION_B, LOW); //confirms motor direction
   analogWrite (MOTOR_SPEED, 0); //set the speed when skill stop is pressed
   delay(100); //pauses a .1 of a second
   }
}
else
 {
  digitalWrite (MOTOR_DIRECTION_A, HIGH); //confirms motor direction
  digitalWrite (MOTOR_DIRECTION_B, LOW); //confirms motor direction
  analogWrite (MOTOR_SPEED, 255); //sets the speed when skill stop is not pressed (1 - lowest, 255 - highest)
 }

}

I added three lines in the beginning in the setup() to see if that works. It doesn't. Thanks again.

L298 modules have 2 sets of inputs to control 2 outputs, are you SURE you are using the correct inputs for the outputs your motor is connected to?
Also make sure you have a wire from ground ( - ) on the L298 to GND on Arduino.

You probably do not intend to have the semicolon on this line:

while (digitalRead(SKILL_STOP) == LOW); //waits for button release

It's a common problem. Sorry that I didn't notice it sooner.

You also need to connect the grounds as edgemoron explained.