if("Sell")
var/obj/o=input("What do you wish to sell?",src) as obj in null|usr
if(!o){usr<<"<font color =green><b>[src]:</font></b><font color=red><b> Stop waisting my time!</font></b>";return}
var/amountof=input("How much of [o] would you like to sell?") as null|num
if(amountof<src.amountof)
usr<<"Don't be trying to rip me off!"
else
switch(alert("I'll give you [o.value*amountof] gold for [amountof] [o]. Sell?",src,"Yes","No"))
if("Yes")
usr.Gold+=o.value*amountof
del(src)
usr<<"<b>You sold [amountof] [o] for [o.value*amountof] gold</b>"
usr<<"<font color=green><b>[src]:</font></b> Thank you."
if("No")
usr<<"<font color =green><b>[src]:</font></b><font color=red><b> Stop waisting my time!</font></b>"
Problem description:
just says NPCs.dm:44:error:src.amountof:undefined var
i don't know how its undefined, or how to define it.
If the src is a obj or what ever, replace mob with the type.