Game Development Community

Clone() causes console error

by Wenceslao Villanueva Jr. · in Torque Game Builder · 12/07/2007 (12:18 am) · 2 replies

I'm generating puzzle pieces for my puzzle game. The way I do it is define 1 puzzle piece in the scene for each type (total 5) and then from there when I generate my board I simply clone(true); the puzzle piece and then set it's position and what not. Everything seems to work just fine but I get this error in the console when ever I run my game:

Con::execute - 0 has no namespace: onRemoveFromScene

The only issue it's causing for me right now is that my game hangs for a few seconds every time I start it while the console spits out 132 of these (My board is 11 x 12).

Is there something I am doing incorrectly or missing some sort of initialization after I clone?

#1
12/07/2007 (1:47 am)
I experienced the same issue with something I was working on a few months back.
It appears to be a bug which results in reporting an error unnecessarily, resulting in console spam.
I got around this by instantiating a new object and then using the copy function as described below:
tdn.garagegames.com/wiki/TGB/Reference:_t2dSceneObject_Other_Methods#copy.28.25o...

Gabriel
#2
12/08/2007 (5:49 pm)
I'll try that Gabriel, Thanks!