Why does this fail to work?

Blitz3D Forums/Blitz3D Programming/Why does this fail to work?

ahhh... so it is.

in that case:
Global foo:Int
Graphics 640,480,0,0

Repeat
	Cls
	key(KEY_UP,foo,5)
	DrawText foo, 10,10

Flip
Until KeyDown(KEY_ESCAPE)




Function key(keyconst,variable Var,amount)
	If KeyDown(keyconst) = 1
		variable = variable + amount
	EndIf
	
End Function