ID:146505
 
Code:
turf
warp1
icon = "warp1.dmi"
src.loc=locate(4,3,1)


Problem description:

Why wont that work. Its been 2 years since ive really coded and now i cant remember [expletive deleted] all.\

Files to be loaded into the resource at compile should be put in single quotes:
icon = 'warp.dmi'
In addition to what Iain said, you can't set a variable to a variable value at compile-time. You'll have to set the loc of that warp in the map editor, or create it at run-time.
okay your problem is an easy one to fix :)

Code: do not copy this because I just spaced here not in DM may cause indention errors if you just copy and paste.

turf
warp1
name = "warp" //to name the turf not really needed
icon = 'warp1.dmi'
Enter()
usr.loc = locate(4,3,1)


Description:
Your only problem was that you didn't call the Enter() procedure for whenever a mob enters that turf it teleports the user to whatever location he/she needs to be.

-Travis(Niran)
In response to Niran
You're abusing usr, and should be using Entered().
In response to Hell Ramen
fine....

turf
warp
icon = 'warp1.dmi'
Entered(M)
M.loc = locate(4,3,1)


In response to Niran
you should prolly do this instead
turf
warp
icon = 'warp1.dmi'
Enter(atom/M)
if(istype(M,/mob))
var/mob/M = P
P.loc = locate(4,3,1)
return 1

AND ENTER is called WHEN the thing tries to enter it, use Entered instead prolly. If you do, take out the return 1
In response to ITG Master
Definitely use Entered() instead of Enter(). I made that mistake in one of my first game and was extremely confused when the pathfinding library I was using started causing all sorts of weird side effects. =P (The game ending as soon as it started, for one.)

Enter() should ONLY be used for saying whether or not the player is allowed to enter the turf. It should have no other effects; use Entered() for things like as teleportation.

Also, that code has vars mixed up quite a bit, and will cause several compiler errors. Do this instead:

turf
warp
icon = 'warp1.dmi'
Entered(atom/movable/A)
if(istype(A,/mob))
var/mob/M = A
M.loc = locate(4,3,1)


(The change from /atom to /atom/movable isn't strictly necessary, but I included it anyway.)
In response to Crispy
and their you have it... =P