ID:144076
 
Code:
for(var/mob/M in world)
if(M.client)


Problem description:

Now, my problem is that whenever I want something to affect all the players of the game I use this snip' mostly. But the problem wit for() is that it goes through each player one by one - and if a player doesn't respond to it - the proc freezes at that spot. How can I go around that - so that afk's are skipped.

(and no I dont want to check if they're afk b/c most of the time ppl dont bother to click the damn button)
client.inactivity

if (client.inactivity > 5 MINUTES)

(I always define MINUTES to mean * 600, so I can type things like that in the code.)
for(var/client/c) is a far better way of doing that.

You can spawn() off the inside of the loop to prevent that problem.