obj
Weapon
var
dmg
weight
value
poison
enchant
equipped
mtype
distance
verb
EquipUnequip(var/mob/M)
set src in usr
set name = "Equip/Unequip"
M.wdmg = src.dmg
M.Weapon = src
M.WeaponType = src.mtype
DblClick()
if(istype(src))
if(get_dist(usr,src) <= 1)
usr << "<b>You pick up [src].</b>"
new src(usr)
del(src)
else
usr << "object too far!"
else
return
Problem description:
When I double click an object, it gives me the following runtime error:
runtime error: Cannot create objects of type /obj/Weapon/Iron_Axe.
proc name: DblClick (/obj/Weapon/DblClick)
usr: BeignetLover (/mob)
src: Iron Axe (/obj/Weapon/Iron_Axe)
call stack:
Also, that if(istype(src)) is nonsensical, unless you're reassigning src earlier in that process.
Also, your EquipUnequip() verb should be using usr for the player instead of the /mob/M argument--otherwise they can equip it to someone else!