ID:158204
 
I have a verb called 'PM' which im using to send a message to a specific player in the game world. It takes a Mob and text. When using it, it would be written out in an input box like so...

PM [mob] "[message]"

I can set the command of a skin input box to "command=PM" so i can then type in that input box;

SomeGuy "Hello!"

..instead of...

PM SomeGuy "Hello!"

However, what id like to do is have the Mob already set as well, so the only thing the player has to type is the message. I'm not sure how to do that though? If i try to set the input command like so "command=PM [mob.name]" it ignores it.

I'm sure im doing something really nooby but ive been out of the BYOND coding loop for a few months and have aquired lots of brain fog.

Any help/points in the right direction appreciated, thanks.
As you should know by reading the DM Reference, as this is documented there, the command bar ignores commands longer than one word unless you use quotation marks

"command=\"PM [mob]\""

No need to put ''name'' there, as [mob] returns the name anyway. That will give you your desired result.

Cheers.
In response to Mista-mage123
Mista-mage123 wrote:
As you should know by reading the DM Reference, as this is documented there, the command bar ignores commands longer than one word unless you use quotation marks

"command=\"PM [mob]\""

No need to put ''name'' there, as [mob] returns the name anyway. That will give you your desired result.

Cheers.

Really? I didnt know that. Thanks though, hopefully this will help me complete a better PM system now.
In response to UnknownDuelist
Anytime.