ID:145500
 
Code:teleport
turf/Teleorter
icon='turf.dmi'
teli2
icon_state="teli2"
density=0
Entered(mob/M)
if(istype(M,/mob))
M.loc=locate(/turf/Teleporter/teli)

turf/Teleorter
icon='turf.dmi'
teli
icon_state="teli"
density=0
Entered(mob/M)
if(istype(M,/mob))
M.loc=locate(/turf/Teleporter/teli2)

Problem description:Ok I have the two icon's needed, teli one is setup at a door and teli2 is setup on the other map of the inside of the building on the door, now when i try to run through the first door i step onto the teli pad but i dont appear on the other map i teleport to right infront of the door i just ran through.

You spelled 'Teleorter' instead of 'Teleporting' after turf/
In response to Mysame
Thx
There is a error in there.
teleport.dm:8:error:/turf/Teleporting/teli2:undefined type path

teleport2.dm:8:error:/turf/Teleporting/teli:undefined type path
In response to VolksBlade
You have to make sure there is a /turf/Teleporter/teli2, exactly as it's spelled. Also, use ismob() for that if() statement.
In response to Artemio
Your basically trapping yourself in a loop. Since when you enter tele1, it teleports you to tele2, but when you enter tele2, it teleports you to tele1. Get it? Basically what you want is to place the player 1 tile away from the teleporter. You can do this by:

turf/Teleporters
icon='asdf.dmi'
_1
Entered(mob/M)
if(ismob(M)&&M.client) //If the mob is a mob, and has a client
var/turf/Teleporters/_2/T=locate() //Locate all of the _2 Teleporters in the world
M.loc=locate(T.x-1,T.y,T.z) //Locate the player 1 tile away from the teleporter
else return ..() //If not, continue doing normal stuff

_2 //Then for teleporter _2
Entered(mob/M)
if(ismob(M)&&M.client) //If the mob is a mob, and has a client
var/turf/Teleporters/_1/T=locate() //Locate all of the _1 Teleporters in the world
M.loc=locate(T.x-1,T.y,T.z) //Locate the player 1 tile away from the teleporter
else return ..() //If not, continue doing normal stuff
In response to Mega fart cannon
Actually, no. If you relocate a mob to a turf using mob.loc it won't call that turf's Enter()/ed() procs, so it won't loop.
You're going about it all wrong!

What you want to do is have a single teleporter /turf type, with a variable to determine the destination. Since all /atoms automatically come with a very handy tag variable, you can modify the teleporter's desired destination and change the tag of any turf in the game to match the teleporter's destination.

turf/Teleporter
icon = 'turf.dmi'

var/target // this is the destination

density = 0

Entered(mob/M)
if(ismob(M))

// make sure the destination exists and is accessable
var/destination = locate(src.target)
if(destination)

M.loc = destination


Since the tag variable can be used with locate() to pinpoint any specific object in the game, all you need to do is open the map editor, create a teleporter, and set its target variable to the same value as the tag variable on another teleporter (or any other turf in the game really) and the teleporter will warp you right to it.