Game Development Community

Error, cannot unlink namespace parent linkage...

by Very Interactive Person · in Torque Game Builder · 11/25/2006 (11:38 am) · 6 replies

I'm getting the following error in the console and i don't understand why:

Error, cannot unlink namespace parent linkage for shell0 for t2dStaticSprite.

First of all shell0 is a animated sprite, and not a static one. Second, the class (namespace) i defined for it (Shell)
is being called, so I don't see why its giving an error.

So what am I doing wrong?

#1
11/26/2006 (8:16 am)
Fixed it by changing its name to "shellSprite0". Was this error becuase the base name of my sprite was the same as the namespace I assigned to it? Or...?
#2
11/26/2006 (9:48 am)
Once you link a namespace to a specific [i]class[/b] of TGB object (t2dStaticSprite, t2dSceneObject, etc), you cannot link that same namespace to a different class.

It's a weakness of namespace linking, and we are working on alternate solutions.
#3
11/27/2006 (5:07 am)
Sometimes it happened to me all you have to do is close TGB and open it again and your problem is fixed
that's what i do
#4
11/27/2006 (8:17 pm)
@Michael - That will allow your namespaces to link from scratch. It will not solve the kind of namespace linking errors described by Stephen. In other words, if you change an object from a static sprite to an animated sprite, you will have to restart TGB for it's namespaces to link properly, *but* restarting TGB will not allow you to have the same namespace linked to both a static sprite and an animated sprite (or similar scenarios with different types of objects).

@Ward - If it tells you it can't unlink the namespace from t2dStaticSprite that means that it is already linked to a t2dStaticSprite (not that the object it's trying to link to is an animated sprite). There is normally a second error that comes with that message that tells what its trying to link to.

In general, the name of an object should never be a scripted class or superclass (or a base C++ class, for that matter).
#5
11/28/2006 (2:54 am)
Ah, makes sense.

Quote:
In general, the name of an object should never be a scripted class or superclass (or a base C++ class, for that matter).
The namespace was called "Shell", and my sprite was called "shell0" (and "shell1", and so on...). Does that count as the same? The problem was fixed by renaming my sprites, so I assume it is.
#6
11/28/2006 (8:09 am)
I'm not sure if this is true for object names, but for variable names, %shell0 is the same as %shell[0]. If it is the same for object names, then the problem may have been that it was thinking of it as an array of shell. Since TS is also case-insensitive, an array of shell is an array of Shell. Hmm, could be a stretch...