ID:143601
 
Code:
turf
Cave
icon = 'Cave.dmi'
In
icon_state = "In"
Enter(atom/movable/M)
M.Move(locate(8,8,1)) //move whatever is trying to enter the portal to the turf at coordinates 8,8 on z-level 1.
Out
icon_state = "Out"
Enter(atom/movable/M)
M.Move(locate(20,97,1)) //move whatever is trying to enter the portal to the turf at coordinates 20,97 on z-level 1.


Problem description: I can't make the out work, when I go in the in cave I go in, but when I try to go out the out cave it won't work. Why?
Look where Enter() is under In (check indentation)
In response to GhostAnime
I read it but I still cant see wants wrong
In response to Merick12
The indentation you showed... It's under /Cave not /Cave/In; likewise for /Cave/Out
Cave
In
Enter_Should_be_here()
Out
Likewise_Here()
Here you go :D
turf
Cave
icon = 'Cave.dmi'
In
icon_state = "In"
Enter(atom/movable/M)
M.Move(locate(8,8,1)) //move whatever is trying to enter the portal to the turf at coordinates 8,8 on z-level 1.

Out
icon_state = "Out"
Enter(atom/movable/M)
M.Move(locate(20,97,1))
In response to GhostAnime
So how would that fit within my code
In response to Merick12
What do you mean?

You need to indent your indents one more time so it is under either /Cave/In or /Cave/Out. What's so hard to understand about indenting the Enter() in one more time?

What is happening, since both Enter()s are OUTSIDE the children In and Out, the second Enter() is overwriting the first Enter()

See pain's post -_-
In response to GhostAnime
I got it Thanks For Helping