ID:2359807
 
Code:
turfs
grass
icon='grass.dmi'
wall
icon='wall.dmi'
density=1
water
icon='water.dmi'
floor1
icon='floor1.dmi'
deepwater
icon='deepwater.dmi'
teleportpad
icon='teleportpad.dmi'
Entered()
var/ax=100
var/ay=50
var/az=1
if(usr==mob)
usr.loc=locate(ax,ay,az)
view()


Problem description:

Not sure why it didnt post it as when i preview it shows my description in the thread. It says i have expected end of statement on line 1, which is the base of the tree.. I'm new so i guess i could be not accurately handling something. Feel free to correct me and tell me why i would really appreciate it
Firstly, you have 'turfs' instead of 'turf'. You have view() there doing nothing, but that's just two issues, you're also doing if(usr==mob) which means nothing in this context and uses the 'mob' variable which doesn't exist.

You should take a look at Entered()/Enter() in the reference, the usage of 'usr' in them is not valid. You'd want to use the argument to the proc.

Entered(mob/M)
if(ismob(M) && M.client) // Makes sure it's a mob and a player.
M.loc = locate(ax,ay,az)


You'll also want to define your ax, ay, and az variables in the object definition and not the proc, so they won't be local variables.
In response to Nadrew
if you don't mind in what context would i define ax,ay,az? I was looking through the reference guide and i must have missed it? also my mistake as i thought when you moved a mob you had to define that it had view when being placed again on the map. I suppose i should have assumed that was default. Every coord in reference i try to go to are always referencing atom and pixel stepping..
You'd define them in the same place you set the icon.

You don't seem to understand the basics of the language, so I suggest reading over the guide and reference material a bit more.
It has nothing to do with that, it's basic variable handling. You have your ax, ay, and az variables defined within Entered(), which makes them local to that proc call. You'd want to define the variables in the scope of the object (outside of the proc), so they can be used elsewhere like the map editor.

I doubt you want to make a new teleportpad in the code each time you want to add a new teleport point in the game.
In response to Nadrew
As i marched back to swear I had just re read all the shit pertaining to it pre coming to post i found where its broke down. ch14 . I was hunting elsewhere. Thx for help