This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by Nic

After following Vallhalla's entire tutorial, I began receiving this error:

I know this is probably an easy fix, but would someone mind to drop me a hint? I'm trying to learn js.

1 decade ago by Nic


1 decade ago by stahlmanDesign

Click to the upper right of your name to edit your posts if you prefer, instead of making a new post to correct a typo.

The error you see is common and is probably a typo in your code. Check your player.js file against the jump n' run demo's player.js

1 decade ago by Nic

Thanks for the fast reply. I didn't realize I could edit it.

I actually followed his tutorial on building an RPG MMO, not the jump and run. And this is his EXACT code, so I have nothing to compare it to.

1 decade ago by dominic

Weltmeister expected that your player.js file defines an entity called EntityPlayer - which it doesn't. It's probably a typo.

Please post the code of your player.js file, so we can have a look.

1 decade ago by Nic

Thanks for taking the time to assist me. The video series is this:

The entire series can be found here:

1 decade ago by Nic

I solved it. Thank you all.

1 decade ago by Nic

For anyone else following, you can correct this error by // out the following lines in player.js

// gamename: playername,

// socket.emit('initializeplayer', this.gamename);

1 decade ago by hallsofvallhalla

sorry I didn't get to this in time.

1 decade ago by Nic

No worries. The engine and game are fine. After I // those out, the multiplayer aspect stopped working completely.

1 decade ago by ShawnSwander

So I have the same issue nic and the problem seems to be that the variable is defined in index.html and weltmeister doesn't see that. Commenting it out might work for a single player game but that is like cutting your feet off because you don't want athletes foot.
I went through and indented all the source code nice and pretty so its easy to read and that helped me understand what is going on to some degree...

Comment it out place your player and then remove the comments this is a temporary workaround.

The variable is defined in index.html and I didn't write the tutorial but I imagine that is because the plan was to pass the variable from a database via php code to index.html.

This is the best I got for now sorry I can't be more helpful.
Page 1 of 1
« first « previous next › last »