ID:142037
 
i wanna do a disconnect verb for the DM
and i do something like that
mob/Del(mob/M) 
view() << "[M] as disconnect"
..()

mob/DM/verb/dc(M as mob in world)
del(M)


its do a disconnect, but its write "as disconnect"
without is name, i try to do it with M.key, its didnt work to


after that i try to do a command that i wont be able to give DC to any 1 who under "DM" (i mean, to my self)

so i did soemthing like that

mob/DM/verb/dc(M as mob in world)
if(M.key = DM.key)
return
else
del(M)


3 error, the pogram dont know what is it DM key.
and before i did "mob/DM/key = "Orhalimi" "

the errors is "DM.key:undefined var"
"missing expression"

thx for help
Orhalimi

It doesn't know what DM.key is because it doesn't exist. In that situation, you want to refer to yourself (mob/DM), or the source of the verb, to put it another way. This is done by the variable, src. Documentation on src can be found here:

http://www.byond.com/docs/ref/info.html#/proc/var/src

In response to Stephen001
itryed with var and src and more some think...

its never work. the pogram kick evreyone or anyone all the time.

1 time its work but the pogram open me 2 windos of kick, and if i choose my name in the the 2 windos noting happend. but if i choose some 1 else name i got kicked...

can you give me please littel more directing.

In response to Orhalimi
mob/verb/Tickle(mob/M)
src << "You tickle [M]"
M << "[src] tickles you"


The above verb takes one argument: M, which will pop up a list asking you to select somebody in the game. src is the person using the verb, and M is the mob you select from the list.

src refers to the source of a procedure or verb. If you have a verb, then the source is always the person using the verb. Thus:

mob/verb/quit()
src << "Bye!"
del src


mob/verb/boot(mob/M)
src << "You boot [M]"
M << "[src] boots you"
del M
I think what you need to do is read the DM guide and any appropriate tutorials in DreamMakers. If you have already read the guide, read it again, carefully.