No module named: direct.directbase.DirectStart

Hi, iv been learning some python now, im not super good but iv made two programs so far (totaly by my own knowleadge no tutorials):
a Phonenumber manager
you can remove and add names with numbers to a list
and a BlackJack game in command promt
Now i came back and tried to work with panda
and heres my code:

        base.camera.lookAt(render.char2)
        mat=Mat4(camera.getMat())
        mat.invertInPlace()
        base.mouseInterfaceNode.setMat(mat)
	base.camera.reparentTo(render.char2)

Iv done .reparentTo on my char2 and parent him to render
Everything else can ident him by using render.char2 EXCEPT my camera!
I meen WOOT?!
My error is this:
libpanda.nodepath has no attribute char2

Someone knows whats wrong?

Ops, forgot to change the topic XD sry, i managed to fix the topic problem but forgot to change the topic XD

It’s “char2”, not “render.char2”.

no cuse if i do that it says: global name char2 is not defined

Have you even learnt python? Why do you want to reparent something to char2 if char2 doesn’t even exist?

Dont be stupid! Ofcurse thats not the whole script!
The char2 maker part is here:

    def LoadCharacter(self):
        self.char2 = loader.loadModel('./models/char2')
        self.char2.reparentTo(render)
        self.char2.setPos(0,0,0)

self.char2 != char2 != render.char2

no but render.char2 = render.char2

If you had followed a Python tutorial about classes, you would have known that Nemesis is right when he said that self.char2 isnt the same as char2 and this isn’t the same as render.char2 either.

ZOMG iv never said that!
Look!

self.char2.reparentTo(render) 

Then the char2 is parented in render!
So then i can select it by doing render.char2 !
I ahve never said that self.char2 is equal to char2 NOR render.char2 !!!
STOP CALLING ME A LIER!!!
freakn noob!

Yes, that’s correct.

Nope. That’s not true. I think you’re messing up Python objects and Panda’s Scene Graph.
By calling reparentTo, you only are rearranging the object in the Panda scene graph. You’re not making the “char2” NodePath object a child of the “render” NodePath object. You still need to access it under the same Python object name.

I didn’t. STOP SHOUTING!!!11!!!1!1111111

Pleasure to meet.

Yes u are calling me a lier TWICE!

Have you even learnt python?

There! I said i have learned python, by asking that you assume i am a lier

If you had followed the python tutorial about classes

Jet again u say i dont know python!
Stop denying!
Either help without calling me a lier or dont even THINK of replying!

It think this will work…

        base.camera.lookAt(self.char2)
        mat=Mat4(camera.getMat())
        mat.invertInPlace()
        base.mouseInterfaceNode.setMat(mat)
   base.camera.reparentTo(self.char2)

and also

thats not true. :confused:

@Andreas:
Gee, that’s a very kind reply of you. It’s really helpful to increase the helpfulness of the forums. Thanks.

Now, listen here for a sec. We are not getting paid to help you, like commercial support teams. We are all spending our free time here trying to help you. You must realize that shouting at us and getting angry at us will most likely result in a mutual reaction from our side.

It’s great to hear that you’ve been learning some Python. (Note: that were your words.) Sorry for the reply that directly pointed you back to the Python manual, but it appears you’re missing some essential experience with object-oriented programming, and hence my (and Nemesis13’s) reply.
Because you were mixing up two essential and core subjects I was under the impression that your experience with Python’s object oriented subjects was still inadequate. Once again, I didn’t mean to say you are a liar.

If you actually THINKed before replying that you would have understood that this is very rude to say, for the reasons I’ve stated before.

Also, may I point out that the beginning of the post is entirely meant sarcastic, referring to the big forum administrator who is always watching.