ID:139045
 
Code:
Sleeping in bed
        var/bed=0
for(var/turf/InsideKonoha/bed11/G in locate(x,y,z))bed=1
for(var/turf/InsideKonoha/bed22/G in locate(x,y,z))bed=1
if(!bed)
src<<output("<b>You sit down and began resting!","infobox")
icon_state="rest"
resting=1
freeze=1
else
src<<output("<b>You close your eyes and start sleeping!","infobox")
dir=SOUTH
overlays+=/obj/sleep
resting=2
freeze=1
sight+=SEE_SELF
see_invisible-=3


Problem description:

This is half of the code ,but this is the part that isnt working. the code tells the proc to check and see if they are in the same location as a bed but in game when your in the location of a bed it just does a normal rest.

Check your location by either using an area for the resting area or using:

if( istype( loc , path ) )