Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Playing Audio Using Keystrokes: Is It Possible?

Annabelle5893

Gold Coder
I'm wondering, how would I make an app that plays audio files using the keys on the number pad? Specifically, I want to make an app that triggers "Rotary Pulse 1" by pressing 1 on the numeric keypad, all the way up to "Rotary Pulse 0" on the 0 key. A dial tone will be toggled on by pressing the spacebar, which will begin with a "receiver pickup" noise. The dial tone turns off when digits are dialed via the numeric keypad. If you press the spacebar either when the dial tone is on, or after dialing a number, a "Receiver Hang Up" noise will be triggered. With the rotary dial sounds, the dial turning to the fingerhole is triggered at key down, and the release of the dial returning to the resting position will be triggered by releasing of the number corresponding to the fingerhole (1, 2, 3, 4, 5, 6, 7, 8, 9, 0). This will be accompanied by the internal sound of the dial pulses as heard in a telephone. What is the code I would use to make this audio app using HTML?
 
Would those adjustments be on the lines where you say, "What are we missing here?"?
In part, yes. The other adjustments come in the form of parameters. I do see you reference a few variables in places where they may not have visibility. In cases like this, you can either make the variable a global variable, or you can pass it to the function that needs it as a parameter.
 
What would an example of that be in code?
JavaScript:
function dial1() {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}


//since the variable "allowDial" is not defined inside of dial1 function, if it's in another function, then call dial1() and pass the variable as a parameter
//make sure you add a parameter to the function definition to reflect this
function dial1(allowDial) {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}

function tempFunc () {
    var dialIsAllowed = false;
    dial1(dialIsAllowed);
}
 
JavaScript:
function dial1() {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}


//since the variable "allowDial" is not defined inside of dial1 function, if it's in another function, then call dial1() and pass the variable as a parameter
//make sure you add a parameter to the function definition to reflect this
function dial1(allowDial) {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}

function tempFunc () {
    var dialIsAllowed = false;
    dial1(dialIsAllowed);
}
So "AllowDial" is a function, and "DialIsAllowed" is a variable? I'm confused! Aren't they both the same parameter?
 
JavaScript:
//here, since "allowDial" is not defined within the function, js will assume that you are referencing a variable called "allowDial" that was defined earlier, at the top of the //script. If js cannot find that variable, then you will get an error telling you that it has not been defined. 
function dial1() {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}


//here, you are declaring that your function, dial1(), is going to need some kind of parameter to be passed into its body so that the logic within works correctly.
//here, "allowDial" is part of the function definition, and has no value yet. The value comes in when you make the call to dial1 and pass whatever data you are intending //to pass
function dial1(allowDial) {
    if(allowDial) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
    //what are we missing here?
}

function tempFunc() {
    //here "dialIsAllowed" is just a variable to hold the data that you are going to pass to dial1
    var dialIsAllowed = false;
    dial1(dialIsAllowed);
}
 
I wonder if I could name the function something like: dialPad, or rotaryDial, depending on what kind of phone I want to set up in my app.
So for example:
JavaScript:
function dialPad () {
    var dialIsAllowed = true;
    dial1(dialIsAllowed);
    
    //isn't this already defined inside of dial1()?
    var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
    tone1.play();
}
 
Last edited by a moderator:
I wonder if I could name the function something like: dialPad, or rotaryDial, depending on what kind of phone I want to set up in my app.
So for example:
JavaScript:
function dialPad () {
    var dialIsAllowed = true;
    dial1(dialIsAllowed);
   
    //isn't this already defined inside of dial1()?
    var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
    tone1.play();
}
Please look at the feedback I left
 
Please look at the feedback I left
I think I might have an idea of what was missing. How's this look to you?
JavaScript:
function ringTelephone(){
    if(!hasTelephoneBeenAnswered = false;) {
        ringRing.play();
        ringRing.currentTime=0;
    }
    
    if(isOffHook = false;) {
        ringRing.play();
    }
    if(allowDial = false;) {
    callIncoming=true;
    setInterval(ringTelephone,5500);
}

function dial1() {
    if(allowDial = true;) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
}

function dial2() {
    if(allowDial = true;) {
        numberDial();
        number=number+"2";
        var tone2=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%202.ogg');
        tone2.play();
}

function dial3() {
    if(allowDial = true;) {
        numberDial();
        number=number+"3";
        var tone3=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 3.ogg');
        tone3.play();
}

function dial4() {
    if(allowDial = true;) {
        numberDial();
        number=number+"4";
        var tone4=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 4.ogg');
        tone4.play();
    //what are we missing here?
}

function dial5() {
    if(allowDial = true;) {
        numberDial();
        number=number+"5";
        var tone5=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 5.ogg');
        tone5.play();
}

function dial6() {
    if(allowDial = true;) {
        numberDial();
        number=number+"6";
        var tone6=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 6.ogg');
        tone6.play();
}

function dial7() {
    if(allowDial = true;) {
    numberDial();
    number=number+"7";
    var tone7=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 7.ogg');
    tone7.play();
}

function dial8() {
    if(allowDial = true;) {
        numberDial();
        number=number+"8";
        var tone8=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 8.ogg');
        tone8.play();
}

function dial9() {
    if(allowDial = true;) {
        numberDial();
        number=number+"9";
        var tone9=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 9.ogg');
        tone9.play();
}

function dialStar() {
    if(allowDial = true;) {
        numberDial();
        number=number+"*";
        var toneStar=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial Star.ogg');
        toneStar.play();
}

function dial0() {
    if(allowDial = true;) {
        numberDial();
        number=number+"0";
        var tone0=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 0.ogg');
        tone0.play();
    }
}

function dialPound(){
    if(allowDial){
        numberDial();
        number=number+"#";
        var tonePound=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial Pound.ogg');
        tonePound.play();
    //what are we missing here?
}

document.onkeydown = function (event) {
    if(event.keycode == 49 || event.keycode == 97) {
        dial1();
    }
    if(event.keycode == 50 || event.keycode == 98) {
        dial2();
    }
    if(event.keycode == 51 || event.keycode == 99) {
        dial3();
    }
    if(event.keycode == 52 || event.keycode == 100) {
        dial4();
    }
    if(event.keycode == 53 || event.keycode == 101) {
        dial5();
    }
    if(event.keycode == 54 || event.keycode == 102) {
        dial6();
    }
    if(event.keycode == 55 || event.keycode == 103) {
        dial7();
    }
    if(event.keycode == 56 || event.keycode == 104) {
        dial8();
    }
    if(event.keycode == 57 || event.keycode == 105) {
        dial9();
    }
    if(event.keycode == 106 ) {
        dialStar();
    }
    if(event.keycode == 48 || event.keycode == 96) {
        dial0();
    }
    if(event.keycode == 109) {
        dialPound();
    }
}

function ring(){
    ringingTone.play();
    timesRung++;
    if(timesRung>1) {
        setTimeout(response,700);
    }   
}

function dial(){
    allowDial=false;
    ring();
    setTimeout(ring,4000);
}

function response(){
    switch(number){
        case "0":
            var operatorPickup=new Audio('callResponses/OperatorAnswer.wav');
            operatorPickup.addEventListener("ended",function(){
                number=prompt("Operator, your number please? (Numbers only; enter 'police' for police and emergency)");
                if(number==null){
                    number="0";
                }
                operatorPutCallThrough();
            });
            operatorPickup.play();
            break;
        case "611":
            var pickup611=new Audio('callResponses/611.wav');
            pickup611.addEventListener("ended", function(){
                timeoutHowler();
            });
            pickup611.play();
            break;
        case "711":
            var pickup711=new Audio('callResponses/tdd-1.mp3');
            pickup711.play();
            break;
        case "811":
            var pickup611=new Audio('callResponses/811.wav');
            pickup811.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup811.play();
            break;
        case "911":
            var pickup911=new Audio('callResponses/911-xxx-fleet.mp3');
            pickup911.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup911.play();
            break;
        case "18477651008":
            var pickupMCI=new Audio('callResponses/MCI.wav');
            pickupMCI.play();
            break;
        case "8675309":
            var pickup8675309=new Audio('callResponses/discoornis-bell-f1.mp3');
            pickup8675309.addEventListener("ended",    function(){
                timeoutHowler();
            });
            pickup8675309.play();
            break;
        case "12124561414":
            busy();
            break;
        case "5551212":
            busy();
            break;
        case "5555555":
            var pickup5555555=new Audio('callResponses/timeout-xxx-fleet.mp3');
            pickup5555555.addEventListener("ended",
                function(){timeoutHowler();
            });
            pickup5555555.play();
            break;
        case "7480900":
            var pickupSelf=new Audio('callResponses/partyline-xxx-fleet.mp3');
            pickupSelf.play();
            break;
        case "18005820655":
            busy();
            break;
        case "6508950":
            var pickupAM=new Audio('callResponses/answering-machine-1.mp3');
            pickupAM.play();
            break;
        case "6500050":
            var pickupModem=new Audio('modem.wav');
            pickupModem.play();
            break;
        case "9703920":
            var pickupFax=new Audio('fax-1.mp3');
            pickupFax.play();
            break;
        case "17147339969":
            var pickup714=new Audio('device-conference.mp3');
            pickup714.play();
            break;
        case "*8217147339969":
            var pickup714=new Audio('device-conference.mp3');
            pickup714.play();
            break;
        case "*6717147339969":
            var pickup714block=new Audio('callResponses/reject2-xxx-fleet.mp3');
            pickup714block.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup714block.play();
            break;
        case "*57":
            var randNum57=Math.random()>=0.5;
            if(randNum57){
                var pickupCallTrace=new Audio('callResponses/trace3-xxx-fleet.mp3');
            } else {
                var pickupCallTrace=new Audio('callResponses/trace-xxx-fleet.mp3');
            }
            pickupCallTrace.addEventListener("ended", function() {
                timeoutHowler();
            }
            pickupCallTrace.play();
            break;
        case "*69":
            var pickupStar69=new Audio('callResponses/return-xxx-fleet.mp3');
            pickupStar69.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickupStar69.play();
            break;
        case "police":
            var pickupPolice=new Audio('callResponses/policePickup.wav');
            pickupPolice.addEventListener("ended",function() {
                var policeComplaint=prompt("Police Department, Sergeant Duffy Speaking.");
                confirm("Really? You say that "+policeComplaint);
                var policeHangup=new Audio('callResponses/policeHangup.wav');
                policeHangup.addEventListener("ended", function() {
                    timeoutHowler();
                });
            });
            pickupPolice.play();
            break;
        default:
            var pickupDefault;
            if(number.length>7){
                pickupDefault=new Audio('callResponses/ldcircuits-bell-f1.mp3');
            } else {
                pickupDefault=new Audio('callResponses/completeordc-xxx-fleet.mp3');
            }
            pickupDefault.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickupDefault.play();
            break;
    }
}
 
I think I might have an idea of what was missing. How's this look to you?
JavaScript:
function ringTelephone(){
    if(!hasTelephoneBeenAnswered = false;) {
        ringRing.play();
        ringRing.currentTime=0;
    }
   

[QUOTE]
//this will not work. when using if-statements, you need to use the double (==) or the triple (===) equals in order to compare.
//plus, you cannot have the semi-colon inside of the if-statement parameters. will cause an error.
[/QUOTE]
    if(isOffHook = false;) {
        ringRing.play();
    }
    if(allowDial = false;) {
    callIncoming=true;
    setInterval(ringTelephone,5500);
}

function dial1() {
    if(allowDial = true;) {
        numberDial();
        number=number+"1";
        var tone1=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%201.ogg');
        tone1.play();
}

function dial2() {
    
[QUOTE]
//this will not work. when using if-statements, you need to use the double (==) or the triple (===) equals in order to compare.
[/QUOTE]
    if(allowDial = true;) {  
        numberDial();
        number=number+"2";
        var tone2=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF%20Tone%20Dial%202.ogg');
        tone2.play();
}

function dial3() {
    if(allowDial = true;) {
        numberDial();
        number=number+"3";
        var tone3=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 3.ogg');
        tone3.play();
}

function dial4() {
    if(allowDial = true;) {
        numberDial();
        number=number+"4";
        var tone4=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 4.ogg');
        tone4.play();
    //what are we missing here?
}

function dial5() {
    if(allowDial = true;) {
        numberDial();
        number=number+"5";
        var tone5=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 5.ogg');
        tone5.play();
}

function dial6() {
    if(allowDial = true;) {
        numberDial();
        number=number+"6";
        var tone6=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 6.ogg');
        tone6.play();
}

function dial7() {
    if(allowDial = true;) {
    numberDial();
    number=number+"7";
    var tone7=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 7.ogg');
    tone7.play();
}

function dial8() {
    if(allowDial = true;) {
        numberDial();
        number=number+"8";
        var tone8=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 8.ogg');
        tone8.play();
}

function dial9() {
    if(allowDial = true;) {
        numberDial();
        number=number+"9";
        var tone9=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 9.ogg');
        tone9.play();
}

function dialStar() {
    if(allowDial = true;) {
        numberDial();
        number=number+"*";
        var toneStar=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial Star.ogg');
        toneStar.play();
}

function dial0() {
    if(allowDial = true;) {
        numberDial();
        number=number+"0";
        var tone0=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial 0.ogg');
        tone0.play();
    }
}

function dialPound(){
    if(allowDial){
        numberDial();
        number=number+"#";
        var tonePound=new Audio('file:///M:/Documents/Virtual%20Phone/DTMF%20Tone%20Dials/DTMF Tone Dial Pound.ogg');
        tonePound.play();
    //what are we missing here?
}

document.onkeydown = function (event) {
    if(event.keycode == 49 || event.keycode == 97) {
        dial1();
    }
    if(event.keycode == 50 || event.keycode == 98) {
        dial2();
    }
    if(event.keycode == 51 || event.keycode == 99) {
        dial3();
    }
    if(event.keycode == 52 || event.keycode == 100) {
        dial4();
    }
    if(event.keycode == 53 || event.keycode == 101) {
        dial5();
    }
    if(event.keycode == 54 || event.keycode == 102) {
        dial6();
    }
    if(event.keycode == 55 || event.keycode == 103) {
        dial7();
    }
    if(event.keycode == 56 || event.keycode == 104) {
        dial8();
    }
    if(event.keycode == 57 || event.keycode == 105) {
        dial9();
    }
    if(event.keycode == 106 ) {
        dialStar();
    }
    if(event.keycode == 48 || event.keycode == 96) {
        dial0();
    }
    if(event.keycode == 109) {
        dialPound();
    }
}

function ring(){
    ringingTone.play();
    timesRung++;
    if(timesRung>1) {
        setTimeout(response,700);
    }  
}

function dial(){
    allowDial=false;
    ring();
    setTimeout(ring,4000);
}

function response(){
    switch(number){
        case "0":
            var operatorPickup=new Audio('callResponses/OperatorAnswer.wav');
            operatorPickup.addEventListener("ended",function(){
                number=prompt("Operator, your number please? (Numbers only; enter 'police' for police and emergency)");
                if(number==null){
                    number="0";
                }
                operatorPutCallThrough();
            });
            operatorPickup.play();
            break;
        case "611":
            var pickup611=new Audio('callResponses/611.wav');
            pickup611.addEventListener("ended", function(){
                timeoutHowler();
            });
            pickup611.play();
            break;
        case "711":
            var pickup711=new Audio('callResponses/tdd-1.mp3');
            pickup711.play();
            break;
        case "811":
            var pickup611=new Audio('callResponses/811.wav');
            pickup811.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup811.play();
            break;
        case "911":
            var pickup911=new Audio('callResponses/911-xxx-fleet.mp3');
            pickup911.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup911.play();
            break;
        case "18477651008":
            var pickupMCI=new Audio('callResponses/MCI.wav');
            pickupMCI.play();
            break;
        case "8675309":
            var pickup8675309=new Audio('callResponses/discoornis-bell-f1.mp3');
            pickup8675309.addEventListener("ended",    function(){
                timeoutHowler();
            });
            pickup8675309.play();
            break;
        case "12124561414":
            busy();
            break;
        case "5551212":
            busy();
            break;
        case "5555555":
            var pickup5555555=new Audio('callResponses/timeout-xxx-fleet.mp3');
            pickup5555555.addEventListener("ended",
                function(){timeoutHowler();
            });
            pickup5555555.play();
            break;
        case "7480900":
            var pickupSelf=new Audio('callResponses/partyline-xxx-fleet.mp3');
            pickupSelf.play();
            break;
        case "18005820655":
            busy();
            break;
        case "6508950":
            var pickupAM=new Audio('callResponses/answering-machine-1.mp3');
            pickupAM.play();
            break;
        case "6500050":
            var pickupModem=new Audio('modem.wav');
            pickupModem.play();
            break;
        case "9703920":
            var pickupFax=new Audio('fax-1.mp3');
            pickupFax.play();
            break;
        case "17147339969":
            var pickup714=new Audio('device-conference.mp3');
            pickup714.play();
            break;
        case "*8217147339969":
            var pickup714=new Audio('device-conference.mp3');
            pickup714.play();
            break;
        case "*6717147339969":
            var pickup714block=new Audio('callResponses/reject2-xxx-fleet.mp3');
            pickup714block.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickup714block.play();
            break;
        case "*57":
            var randNum57=Math.random()>=0.5;
            if(randNum57){
                var pickupCallTrace=new Audio('callResponses/trace3-xxx-fleet.mp3');
            } else {
                var pickupCallTrace=new Audio('callResponses/trace-xxx-fleet.mp3');
            }
            pickupCallTrace.addEventListener("ended", function() {
                timeoutHowler();
            }
            pickupCallTrace.play();
            break;
        case "*69":
            var pickupStar69=new Audio('callResponses/return-xxx-fleet.mp3');
            pickupStar69.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickupStar69.play();
            break;
        case "police":
            var pickupPolice=new Audio('callResponses/policePickup.wav');
            pickupPolice.addEventListener("ended",function() {
                var policeComplaint=prompt("Police Department, Sergeant Duffy Speaking.");
                confirm("Really? You say that "+policeComplaint);
                var policeHangup=new Audio('callResponses/policeHangup.wav');
                policeHangup.addEventListener("ended", function() {
                    timeoutHowler();
                });
            });
            pickupPolice.play();
            break;
        default:
            var pickupDefault;
            if(number.length>7){
                pickupDefault=new Audio('callResponses/ldcircuits-bell-f1.mp3');
            } else {
                pickupDefault=new Audio('callResponses/completeordc-xxx-fleet.mp3');
            }
            pickupDefault.addEventListener("ended", function() {
                timeoutHowler();
            });
            pickupDefault.play();
            break;
    }
}
 
Please see my commentary. I also saw the post you deleted. You don't need to declare a variable multiple times: you only declare it once, and reuse it as you need to.
 
I'm confused! Which variable did I post multiple times?
It was a post you deleted... staff have ability to see posts longer after they have been deleted 🙂 but it was the post where you used this line more than once:
JavaScript:
  var dialIsAllowed = true;

Don't worry though, since you deleted the post, I am assuming you may have caught that, or may have deleted for some other reason. Only reason why I brought it up was to remind of the ability to reuse of variables 🙂
 
For some reason, I'm still getting the error, "Missing ) after condition", which claims to be on line 91:25. However, when I read that line carefully, it doesn't seem to me that there's any errors. Here's the code of that line.
JavaScript:
    if(allowDial == false;) {
Clearly there's actually a ), so I'm not sure what happened there.
 
For some reason, I'm still getting the error, "Missing ) after condition", which claims to be on line 91:25. However, when I read that line carefully, it doesn't seem to me that there's any errors. Here's the code of that line.
JavaScript:
    if(allowDial == false;) {
Clearly there's actually a ), so I'm not sure what happened there.
Might wanna look before that closing parenthesis 😉 HINT HINT 😉
 
Back
Top Bottom