Joystick In Blender

Hey guys long time no see, I was surfing arounf and I foundhttp://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=4336 I was wondering just how do you get anything to move with it. I got everything working (after correcting a few spelling errors but I cant seem to get it to move the cube. All I keep getting is error in line 16 and 25 x not defined! What’s the probem?

import GameLogic 
import Joystick 

Joystick.initJoystick() 

Joystick.pumpEvents() 

motion = GameLogic.getCurrentController().getActuator("name") 

# then 
currentAxis = Joystick.thisAxis()  
#enter Joystick.Debug or print this var to get the values 

if currentAxis[0] == 1 and currentAxis[1] < -3200: 
    
    motion.setLinearVelocity(x,y,z) 
    
    GameLogic.addActiveActuator(motion,1) 

#for buttons 

button = Joystick.thisButton() 

if button == 1: 
    motion.setLinearVelocity(x,y,z) 
    
    GameLogic.addActiveActuator(motion,1) 

uhh

https://blenderartists.org/forum/viewtopic.php?t=28826

thats just an example, replace x,y, z with real values

Ok Thanks