Missing ) in parenthetical error, but everything seems to be closed off properly

I'm getting the missing ) error from the following code. JS Hint says a ) is expected from the top line, but "if" found instead.

denom = (((theZombies[j].y + 15) – theZombies[j].y) * (mouseX – Player1.x) – ((theZombies[j].x + 18) – (theZombies[j].x - 18 )) * (mouseY - Player1.y));

if (denom != 0) {theZombies.splice(j, 1);}

But I don't get it -- all the parentheses are closed off properly. I've also looked back in the code and can't find an unclosed one previously. Any ideas what I'm missing?




Your characters are atually U+2013 EN DASHes, which are not legal in Javascript.

You need to use U+002D HYPHEN-MINUS instead.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.