mousey() (I believe) is the mouse pointer's vertical co-ordinate.
So if
mousey() = 150 then your mouse pointer is 150 pixels from the top of the screen.
Pizzaman's right in saying you need to add brackets at the end of the command.
I think if you want your character to move to the newly selected position, it should maybe be like this: -
if mouseclick() > 0 then ypos = mousey()
I think that should work and I welcome anyone to correct me. I'm not much of a coder anyway, so I'm sorry if this is wrong.
At least I'm giving it a go, I guess?