Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Julio Martin Hernandez
Julio Martin Hernandez
6,355 Points

Not a Function (Coding Your First HTML5 Game)

Hello!

I'm learning lime.js framework in the Coding Your First HTML5 Game lesson, and I'm in the part where I need to create a new object for Mike the Frog. Whenever I update the dependencies, it shows an error that the object cannot be found. So what I did is to manually create the frog object named "frog" using bin/lime.py create.

Next is an error of "Uncaught TypeError: object is not a function " in the line "this.frog = new frog();". I've already coded "goog.require('frog'):" and my javascript file already has the "frog = function(){ /codes here/ };"

Help is really appreciated. Thank you!

1 Answer

Julio Martin Hernandez
Julio Martin Hernandez
6,355 Points

I already made my code to work, and correct me if I'm wrong, I think it's only about the naming of the function.