Oh my god @tulamide!
I was under the impression that the x and y in the distance(x1,y1,x2,y2)expression where placeholder names for the objects (Player.X, Sprite.X, Player.Y, Sprite.Y) and the 1 and 2 where representing the x and y coordinates...!!! Now that I think of it, I don't understand how I convinced my self of that!
That was a mean
.capx my friend, thank you so much!!!