No indenting?

I’ve been using Python for about a year, but I just got into Panda3D. So I’m working on a small game so I can learn the basics. I’ve set up the basic function definitions for movement. But i keep getting an error about no idention on a certain line. But I have indented it. :frowning: Here’s my code:

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math

class World(DirectObject):
	def __init__(self):

    		base.disableMouse()
    		camera.setPos ( 0, -20, 20 )
    		camera.setHpr ( 0, -45, 0 )

		#Load the first environment model
		environ = loader.loadModel("models/environment")
		environ.reparentTo(render)
		environ.setScale(0.25,0.25,0.25)
		environ.setPos(-8,42,0) 

		#Load the panda actor, and loop its animation
		pandaActor = Actor.Actor("models/panda-model",{"walk":"models/panda-walk4"})
		pandaActor.setScale(0.005,0.005,0.005)
		pandaActor.reparentTo(render)
		#pandaActor.loop("walk")

	def setupKeys(self):
		self.accept("w", moveForward)
		self.accept("w-up", stopMoving)
		self.accept("s", moveBack)
		self.accept("s-up", stopMoving)
		self.accept("mouse1", fireWeapon)

	def moveForward(self):
		# move forward

	def moveBack(self):
		# move back

	def stopMoving(self):
		# stop moving

	def fireWeapon(self):
		# fire the weapon

w = World()
run()

It says that it is expecting an idention at “def moveBack(self):”. But as you can see, it is indented! What’s going on here?

It’s mad because you have no function body in the previous function definition. You have to have at least one command in each function. If you really want an empty function, use just “pass” or “return”.

David