ID:147019
 
area
Safe
icon='turfs.dmi'
icon_state="Safe"
name=""
density=0
Enter(mob)
usr.safe=1
Exit(mob)
usr.safe=0

I thought I could be slick and make it easy but I guess not.....Another way?

Enter(/mob)
usr.safe=1
Exit(/mob)
usr.safe=0

Maybe that?

Anyway, what's wrong with it?
What's it meant to do?
What is it doing?
What is it not doing?
IT is meant so when the mob enters that var is given and wen that var is True he can't attack.Is it is false then he can.
-----------EDIT--------
Also I jsut get a duplicate definition when I put the "/" in,
Enter() and Exit() are used to determine whether something is allowed to enter or exit the location. You return true if it is allowed, false (or nothing) if it isn't. What you're doing there is not allowing anything to enter or exit that area.

You want to use Entered() and Exited() in this case. These are only called after something sucessfully enters or exits the location in question.
CodingSkillz2 wrote:
> area
> Safe
> icon='turfs.dmi'
> icon_state="Safe"
> name=""
> density=0
> Enter(mob)
> usr.safe=1
> Exit(mob)
> usr.safe=0
>

I thought I could be slick and make it easy but I guess not.....Another way?
Lemme see..
area
Safe
icon='turfs.dmi'
icon_state="Safe"
name=""
density=0
Entered(mob/M)
M.safe=1
Exited(mob/M)
M.safe=0

try that, if it doesnt work then try:
area
Safe
icon='turfs.dmi'
icon_state="Safe"
name=""
density=0
Enter(mob)
..()
usr.safe=1
Exit(mob)
..()
usr.safe=0

otherwise, its probably just an error in your fight verb when it checks to see if they are safe or not.
In response to Rurouni Dragon
It didn't work soo...
mob
verb
Attack(var/mob/M in get_step(usr,usr.dir))
if(usr.at==1)
return
else
if(usr.safe)
usr<<"You can't attack here."
return
else
usr<<"You attack [M]"
usr.at=1
M<<"[usr] attacks you"
M.hp-=usr.attck
M.Death()
usr.Lvl()
sleep(7)
usr.at=0
In response to CodingSkillz2
hmm.... try this
mob
verb
Attack(var/mob/M in get_step(src,dir))
if(at==1)
return
else
for(var/area/a in loc)
if(istype(a,/area/Safe))
src<<"You can't attack here!"
return
src<<"You attack [M]"
at=1
M<<"[src] attacks you"
M.hp-=attck
M.Death()
Lvl()
sleep(7)
at=0
In response to Rurouni Dragon
oh yea, drop the safe var if that works