Switching between weapons

Hello
I have written the code for switching weapons between 1 and 2. But I encountered the following error.
BroadcastMessage fire has no receiver!
UnityEngine.Component:BroadcastMessage(String)
play weapon:Update() (at Assets/Script/play weapon.js:13)

code:

function Awake(){
selectWeapon(0);
}
function Update () {
if(Input.GetButton(“Fire1”)){
BroadcastMessage(“fire”);}
if(Input.GetKeyDown(“1”)){
selectWeapon(0);}
else if(Input.GetKeyDown(“2”)){
selectWeapon(1);}
}
function selectWeapon(index:int){
for(var i=0;i

You probably named your function Fire and you pass fire.

BroadcastMessage("fire");