for(M in world)
var/xloc
var/yloc
if(src.x < 5)
xloc = 5
if(src.x > 17)
xloc = 17
if(src.y < 5)
yloc = 5
if(src.y > 17)
yloc = 17
M.loc = locate(xloc,yloc,1)
Does this look all right? Well, if it does, then locate is broken because it locates me to 0,0,0.
(Whoa, this forum spaces out code a lot... btw, merci beaucoup for the preview function =)
Are you sure you want to do src.x, src.y, etc? Just looking at your code, I would assume it would be M.x, M.y, etc:
<code> </code>
Spacing is now fixed. Boy, it didn't take long to find a forum bug did it :)