简体   繁体   中英

Can't find function

I am making my own version of Cookie Clicker (origional avaliable at http://orteil.dashnet.org/experiments/cookie/ ) just for fun. This website requires many pictures, and all are in my websites directory. The edited code for the website can be found at http://pastebin.com/VbXyu0CH but there isn't much different about it.

When I go to my website at http://cookieclicker.herobo.com/ , it hangs on loading. When I open up the JavaScript console, I see it gets "Unexpected token <", and if I hover over the cookie or click it, it gives me HoverCookie and ClickCookie errors, respectively. What am I doing wrong? Am I missing a file? Thank you. It is a very localized question, but please do help.

Your website doesn't seem accessible. All I can guess is that an html file is served instead of a javascript file, hence the "Unexpected token <" error. This can be an error page; check that your script tag references the correct url!

You have a missing closing bracket } right at the end of your pastebin script. The last bracket closes the if but not the Main function. This means that it is attempting to read the following < as part of the script/function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM