PDA

View Full Version : Unscriptable Object Error


shivanangel
10-11-2006, 09:20 AM
Hi,

what does the error:

TypeError: unsubscriptable object

mean?

I am taking in translation data from two objects,
a viewpoint and an model and I'm
trying to subtract to find a difference between
the two for a camera rig I'm working on.

I use viz.get(viz.POSITION)
to get the location of the elements and place them
in variables. I tried using the array type and then
I tried separating the individual translation components
into x, y, and z variables but I keep getting the same error.

Thanks

farshizzo
10-11-2006, 11:04 AM
The error means that the object you are trying to access is not a list. This is because viz.get(viz.POSITION) is not a valid command. If you are trying to get the position of the viewpoint try the following instead:viz.get(viz.HEAD_POS)For node objects you would do:node.get(viz.POSITION)