CAN YOU EXPLAIN ME WHY IT ISN'T WORKING?!?!?

Hi, I want to able or disable a buzzer with a press button. I post the code:
#include <NewTone.h>

#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

#include <IRremote.h>
#define flechas 0xFF9867
#define usd 0xFFB04F
const int buttonPin = 7;
const int speakerPin = 8;
int buttonState = 0;
int alarmaon;
int led = 6;
int RECV_PIN = 9; //declaramos el pin que recibira la señal
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
pinMode(speakerPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
irrecv.enableIRIn();
pinMode(led, OUTPUT);

}

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
if (results.value == flechas) {
alarmaon = true;
digitalWrite(led, HIGH);
}
if (results.value == usd) {
alarmaon = false;
digitalWrite(led, LOW);
}

irrecv.resume();
delay(10);
}

buttonState = digitalRead(buttonPin);

if (alarmaon = true) {
if (buttonState == HIGH) {
noNewTone(speakerPin);
delay(200);
NewTone(speakerPin, 440, 200);
delay(200);
}
else {
noNewTone(speakerPin);
}
}
else {
noNewTone(speakerPin);
}
}

WHY IT ISNT WORKS?? Thank you.

 if (alarmaon = true)

Wrong, unless, of course, you want to set alarmaon to true then test its value

I want to able the push button to activate the alarm (alarmaon=true) and when it's able, i can activate the alarm with the push button

One more time:
if (alarmaon = true) {
Change to:
if (alarmaon == true) {

Thank you bro, What a stupid mistake xDD

Dabitsr:
Thank you bro, What a stupid mistake xDD

Not stupid, but very common

You can avoid the problem by turning the test on its head and using

if (true == alarmaon)

The compiler will complain if you accidentally do

if (true = alarmaon)

Anyway the simple way to get this right is

if (alarmaon)

the comparing of a boolean to a truth value is redundant, its already a truth value!