在括号错误中丢失),但一切似乎都被正确关闭了 [英] Missing ) in parenthetical error, but everything seems to be closed off properly
本文介绍了在括号错误中丢失),但一切似乎都被正确关闭了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从以下代码中得到了缺失的)错误。 JS Hint说a)预计来自顶线,但如果发现了。
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?
谢谢!
推荐答案
您的 -
字符通常是 U + 2013 EN DASH es,这不是合法的Javascript。
Your –
characters are atually U+2013 EN DASHes, which are not legal in Javascript.
你需要使用 U + 002D HYPHEN-MINUS 相反。
这篇关于在括号错误中丢失),但一切似乎都被正确关闭了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文