My initial attempt was this.
Tele_Plyr()
for(var/client/P)
alert("Are you sure you wanna tel to him?","Tele?","Yes","No")
if("Yes")
usr.x = P.x; usr.y = P.y-1; usr.z = P.z
else
usr << "ok nevermind then"
it told me that P.x was undefined. I know P is defined and i know x, y, & z are defined by default, so how come when i put them together it gives me an error? I came up with the solution you see below but it didnt work.
Then I changed "if(P == client)" to if(P.client) and it worked. Im still a little muddy on how == works so i tried something else. Im a little confused though, isnt "==" checking if the two are equal? Why wouldnt it work?
Edit for random thought: is it because client is a 0 or 1 sum to just check if you are one or not? So == then wouldnt actually be checking anything?
And i just realized i was using for() wrong too in my first attempt.
Tele_Plyr()
var/list/clientlist
for(var/mob/P)
if(P == client)
clientlist += P
var/mob/chosen = input("Tele to who", "Who") in clientlist
alert("Are you sure you wanna tel to him?","Tele?","Yes","No")
if("Yes")
usr.x = chosen.x; usr.y = chosen.y-1; usr.z = chosen.z
else
usr << "ok nevermind then"
else
return
/client 's don't have locations. /mob 's, controlled by /client 's, however can have a location such as x, y, and z.