Hi i have
turf/DblClick()
Teleport(src)
proc/Teleport()
var/newx
var/newy
usr.loc=locate(newx,newy)
but when you teleport it goes to black screen i want it to teleport you to where you double clicked
please can someone help.
ID:173553
![]() Dec 19 2003, 6:51 am
|
|
This is wrong on so many levels. They're things you should have learned long before now.
First: No put usr in proc. Ungh. Nevermind that usr will have the correct value here because of how you're using the proc; it's still wrong. Also wrong is that Teleport() is a global proc. Instead make Teleport() a mob proc, and call usr.Teleport(), wherein src would then be the mob.
Second: You sent the turf as an argument to Teleport(), but you never defined any arguments in the proc. Instead you use two vars, which you never set to any value before trying to use them.
Third: locate() never ever takes just two arguments. You forgot about z.
Lummox JR