BGE script making blender crash

Well I am currently experimenting while looking forward to creating a blender game, but I encounter a big problem: I can’t figure out why blender keeps crashing each time I run this script:


import bge

cont = bge.logic.getCurrentController()
player = cont.owner

A timer property named time already exists

def start():
…player[‘Boo’] = True

def main():
…if player[‘Boo’] == True:
…player[‘Boo’] = False
…move(0.1, 2.0)

def move(val, tim):
…player[‘time’] = 0.0
…while True:
…if player[‘time’] <= tim:
…player.applyMovement((0, val, 0), True)
…else:
…break

if ‘Boo’ not in player:
…start()

main()

This should execute the move() function once, taking the arguments 0.1 for speed and 2.0 for time of the movement but blender freezes and crashes each time I run it…

If anyone has at least an idea why this happens it would be much appreciated,

Callaway.