ID:2114676
 
(See the best response by Super Saiyan X.)
Code:
for (var/client/c in locate(1, 1, 1))
world << "Loc."


Problem description: I use the above code and as I test multiplayer, it doesn't print even if another client player is in (1, 1, 1) position. If I replace however var/client/c with var/mob/player then it works...

Best response
clients do not exist in the world as physical objects, so they wouldn't exist in a turf, which locate() returns; they represent users that are connected to the world and have a mob; but not the mob itself.

You can loop through the mobs instead, and check if they have a client, if(player.client)
Couldn't you also do:

for(var/client/c)
//...
In response to FKI
FKI wrote:
Couldn't you also do:

> for(var/client/c)
> //...
>


Sure, but then you'd have to check each client's (in the world) mob.loc
That might totally be unnecessary when you just want to check the contents of one specific turf.
In response to Super Saiyan X
Very true. I was more focused on your post than the OP and missed what he was trying to do.