ID:146034
 
Code:
client
Click(atom/A)
if(isturf(A) && usr.teleporting)
usr.loc = Move(A)
usr.client.mouse_pointer_icon = null
usr.teleporting = 0


Problem description:
My screen goes black instead of moving my person to where I click. I tried using src.mob instead of usr. and it does the same thing...How can I fix this?

Because you are doing Move() wrong. Move returns 1 when it does it successfully, and 0 when there is something in the way.

You might also want to use src.mob instead of usr.

client/Click(atom/A)
if(isturf(A)) && (A in view(mob, 7) && mob.teleporting)
if(mob.Move(A)) // if it moves successfully, it changes the vars, otherwise it outputs "Move failed"
src.mouse_pointer_icon = null
mob.teleporting = 0
else
mob << "Move failed"


~~> Dragon Lord

In response to Unknown Person
Thanks, everything works now!