Page 1 of 1

Class is not defined

PostPosted: Tue May 30, 2017 8:34 am
by obelus
Hi, im currently progressing through the video tutorials and i am stuck on number two.
specifically when i try to steam my ExampleEntity i get this error.

Uncaught IGE *error* [IgeStreamComponent] : Network stream cannot create entity with class ExampleEntity because the class has not been defined! The engine will now stop.

I dont belive i have dont anything other that what is covered in the video's

I have made sure there is a reference to the ExampleEntity File in my client and server config files and cant seem to figure it out any ideas?

http://imgur.com/a/Lzv3r

is the stream component the piece that's not defined?

Re: Class is not defined

PostPosted: Wed Jul 12, 2017 10:51 am
by rob
Hey ya,

I'm not sure what would cause that except the video tutorials might be slightly out of date with the newer updates to the engine.

Could you try to base your work off one of the example projects in the examples folder and see if that works for you?

Re: Class is not defined

PostPosted: Tue Oct 03, 2017 5:29 pm
by mvgribbin
Wanted to add a reply to this in case anyone else runs into this issue.

I believe the problem was that on the client config I had forgotten a /

I notice the same issue in your code, maybe the video was hard to read.

You have:

Code: Select all
'.gameClasses/ExampleEntity.js'


where you should have

Code: Select all
'./gameClasses/ExampleEntity.js'


After making this change and clearing my cache, I went from having the same error as you to a working client displaying the triangle seen in the tutorial video. Hope this helps someone else! Those of us getting used to this syntax for the first time are prone to miss the little things.