Is this the entire code? Because it works fine for me.
I'd wager a guess that it's not, and that you're doing something between catching the mousedown event and the assignment that is changing the values in
params. You've already given explicit symbols for the
params, you might as well use them...
PHP Code:
player.chat = this.start_x = mouse_x/16;