ID:150504
 
Everytime i use m.loc=locate(x,y,z), it always tells me its a bad var. ive tried it to link maps, ive tried it to make a turf move you to a different place. But its always a bad var, now i know this is probly somethin really simple, but i cant figure it out, can anyone please tell me what im doin wrong?
How are you declaring m?

-AbyssDragon
In response to AbyssDragon
i try to use it like everyones told me to , m.loc = locate(x,y,x) thats all
In response to Jotdaniel
Thats an example, not a fully functioning piece of code.

If you asked how to output text to the world and we responded with:

world << "Blah blah blah"

you wouldn't copy and paste that as is, you'd change it to:

world << "Welcome to my game!"

or whatever. So why do you copy and paste the m.loc example?

Anyway, unless you declare m elsewhere as a variable of a type that has a loc, the compiler will have no idea what m.loc means. Chances are, though, the mob you're trying to relocate is either src or usr, and declaring m is irrelevant.

-AbyssDragon
In response to AbyssDragon
ok.... ill try and figure it out, that helped a little. i know its hard to help without actualy giving a peice fo code sometimes, thanks for trying.
In response to Jotdaniel
AbyssDragon asked:

How are you declaring m?

And you answered:

i try to use it like everyones told me to , m.loc = locate(x,y,x) thats all


This has nothing to do with AB's question. A declaration looks something like this:

var/mob/m
icon = 'icon.dmi'
hat_size = 13
In response to Skysaw
i aleady got the problem fixed