Simple Python script error

Here, my script is supposed to make move an armature.

cont = GameLogic.getCurrentController()
own = cont.getOwner()

w = cont.getSensor(“1”)

motion = cont.getActuator(“motion”)

walk = 0
speed = 5

if w.isPositive():

walk = speed

motion.setLinearVelocity(0, walk, 0, 1)
GameLogic.addActiveActuator(motion, 1)

When i run it , I get this Error:

unable to initialise error (0) in noMaterial, image will be unavailabel.

Helb please!!!

script works for me… I dont think it is a python script error. If it was it would say

Python compile error from controller "cont#CONTR#1": 
  File "Text", line 14

Make sure that all the things contained in the if statement are indented… ie


if w.isPositive():
      walk = speed

That error isn’t in your python script, that is an error within blender. Your script is fine, just make sure to use indentation after a : appears in your script.

Hi everyone, thanks for your help but in my script, after the " : " there is an indent.

Whatever, I will uninstall Blender for the 2.48, maybe it will work.