Tone Generation

Hi Guys,

Sadly my code isn't working. I still don't quite have the 'hang' of using instances and methods and libraries...I'm working on it, though!!!!

Here is the code that isn't working...but, once again, remember I'm just trying to have one note play with one button press...once I get that running, I'll add more buttons and more notes to better understand what is going on....here's the code:

#include <Tone.h>

#define speaker 9
#define button 4

Tone tone1;

int buttonState = 0//store value of button pin

void setup(){
  pinMode(speaker, OUTPUT);
  pinMode(button, INPUT);
  tone1.begin(13);
  
}

void loop(){
  buttonState = digitalRead(button);
  speaker = tone1.play(NOTE_A4);
   if (button == HIGH){
    tone1.play(NOTE_A4);
  }
}

I'm getting an error message that says: error: expected unqualified-id before numeric constant In function 'void loop()':

Thanks for the help!

Annie in Idaho