ID:175174
 
I'm trying to make a mob (slave) in the location where the player clicks. The slave can only be created if the location is not dense. Here is what I have:

mob
verb
MakeSlave()
Click(turf/T)
if(!T.density)
//if stuff here
else
//else stuff here



The only error I get is:

Reproduction.dm:28:error: proc definition not allowed inside another proc
The problem is that you're trying to define the click proc inside your makeslave verb.
In response to Jon88
So do I have to make a proc that defines the click verb or do i have to do something like

mob
click()
//blah blah?

The second way would be kind of confusing because I want to make click do something else.

Or is there some other way to do it ?
In response to SSChicken
You have to do:
mob
Click()
//Blah, blah, blah
In response to Jon88
How many argument can a click proc take, I'm not sure if I used the word "arguments" correctly..

Ex:

Click(argument,argument,argument,argument)
In response to SSChicken
SSChicken wrote:
How many argument can a click proc take, I'm not sure if I used the word "arguments" correctly..

Ex:

Click(argument,argument,argument,argument)

That doesn't really matter, since you can't just set up your own arguments to Click() anyway; it will never be called with them. The arguments Click() uses are defined in the reference.

Lummox JR