ID:146699
 
Code:
    Give(var/mob/m in world)
set category="Admin"
verb
Exp(var/mob/m in world)
var/Amount = input("How much Exp. Points do you wish to give?","Give") as num
if (Amount < 0)
return()
if(m.client)
m << "<B>You are given [Amount] exp by the gods.</B>"
src << "<B>You have given [m] [Amount] exp.</B>"
m.Exp += Amount

TakeExp(var/mob/m in world)
set category="Admin"
if (Amount < 0)
return()
if(m.client)
var/Amount=input("How much EXP would you like to take?","Exp Taking") as num
m << "<B>[Amount] exp has been taken by the gods.</B>"
src << "<B>You have taken [Amount] exp from [m].</B>"
m.Exp -= Amount


Problem description:

Armor.dm:194:error: proc definition not allowed inside another proc



I originally had each verb separate and I was going to add separate verbs for other attributes. SO I decided to make one verb that allows me to pick which one I want to do but I always get the error, Armor.dm:194:error: proc definition not allowed inside another proc . And I had it earlier when I tried to put a verb under an onclick thingy as well.


Any ideas?



You need to make a proc that would choose which verb to use, you can't do it the way you are trying to do.
In response to N1ghtW1ng
<(x__x)>
In response to Newen
"verbs" are in fact procs, and you can't define them inside of eachother. That's you're looking for is a simple switch(input()) combination.

switch(input("What do you want to give?","Give")in list("Experience","Gold"))
if("Experience")
//do experience stuff here
if("Gold")
//do gold stuff here
In response to Nadrew
Or, he could just make his previous verbs procs and call them in the if clause in the code you posted >.> That is what I meant basically. I think it sort of came out wrong =P.
In response to N1ghtW1ng
I just finished doing what Nadrew suggested and it works quite well! :D Thanks for the help!