ID:2015479
 
(See the best response by Ter13.)
Code:
    Bump(mob/M)
if(!istype(M, /mob/player)) return
if(src.dir == NORTH)
M.dir = SOUTH
else if(src.dir == SOUTH)
M.dir = NORTH
else if(src.dir == EAST)
M.dir = WEST
else if(src.dir == WEST)
M.dir = EAST

M.movelock = 1
src.movelock = 1
view() << "[M.FirstName] [M.LastName] begins their battle with the slime!"
src.overlay += 'healthbar.dmi'
M.overlay += 'healthbar.dmi'


Problem description:
If M.movelock and src.movelock are defined vars, then why aren't the corresponding variables associated with overlays?
Best response
overlays. You typed overlay
Oh my gosh... ;-; Thank you.
It's always the smallest things, innit? =D
What Ter said. I'm not exactly sure what you're doing with this code though. The direction handling can be simplified without the need for that if else chain. Also, are you calling bump from the slime? that's so weird. /mob/M is a player.. I'm all types of confused right now. I wouldn't make the bump procedure exclusive to one mob, else you'll be done a lot of repetition
I've since deleted that stuff. I was just playing with some code to get back into BYOND programming. If you're confused, it's probably because you're used to good coding. I am a bad programmer. :P
In place of that if/else tree with the dirs, you might try this:

M.dir = turn(dir, 180)

Alternatively:

// make M face src
M.dir = get_dir(M, src)

Since this happens in a Bump(), in practice both of those will end up doing the same thing.