ID:146444
 
Code:
Teleport(mob/M in world)
switch(input("Teleport to [M]?")in list("Yes","No"))
if("Yes")
M<<"You have been teleported to"
if(!M) return //do nothing if M has been deleted since they were chosen
usr.loc=locate(M.loc)


Problem description: I am very confused, this done not seem to be working....

Teleport(mob/M in world)
switch(input("Teleport to [M]?")in list("Yes","No"))
if("Yes")
if(!M) return //do nothing if M has been deleted since they were chosen
usr.loc=locate(M.loc)
usr<<"You have been teleported to [M]"
Don't just copy and paste. Learn!

mob/verb
Teleport(mob/M in world) // Make sure it is a verb also >.>
switch(input("Teleport to [M]?")in list("Yes","No"))
if("Yes")
if(!M) return //do nothing if M has been deleted since they were chosen
src<<"You have been teleported to [M]"
usr.loc=locate(M.loc)