name "self" is not defined

Hey there! It’s me again…
That’s the error it gives me… for the following instruction:

self.accept( "w", self.move, ["FW"])

That are my imports:

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
from direct.gui.OnscreenText import OnscreenText
import cPickle, sys, os, math

How do I solve this?

Thanks in advance,
Xan

I recommend you to read this (or a similar tutorial about classes in Python):
docs.python.org/tutorial/classes.html

I had this happen too. Check your indentation to make sure that you are still inside the class definition.