I need actualize python from blender 2.49 to 2.57

Sorry for my bad english, I’m argentinian.

I need actualize the last line in python:

import bge

co= bge.logic.getCurrentController()
o = co.owner
Sensor = co.sensors["mouse"]

#muestra el raton
bge.render.showMouse(1)

#parametros
sensibilidad=0.1
xultimoframe=100

#leo la posicion del raton en el eje y

Xpos= Sensor.position[0]

alto= bge.render.getWindowHeight()/2
ancho= bge.render.getWindowWidth()/2

o['xmouse'] = o['xmouse'] - (Xpos-ancho)*sensibilidad

bge.render.setMousePosition(ancho,alto)

last line;
replace with
bge.render.setMousePosition(int(ancho),int(alto))

Thanks, my script works now :slight_smile: