mardi 21 août 2018

Javascript if statement not working when I try to use less than on zero [on hold]

I've tried to use this code:

if (score > 0){ endGame(); }
function endGame()
{
    click.disabled = true;
    multiply.disabled = true;
    autoclick.disabled = true;
    autoclickOn = false;
    alert("Blah Blah Blah");
}

But it just hates it when I try to call the function. Got any ideas?

If you want the full code please got to: https://jsfiddle.net/Mo_Wizard/km3ypzj7/

Thanks

Edit: I've tried variations of this (Things like if (0 > score){} or if (score == -1){})but each time I try it, I don't get the alert from the function.

Aucun commentaire:

Enregistrer un commentaire