ID:1929577
 
(See the best response by LordAndrew.)
Code:
obj/verb/drop()
set name = "Drop"
new src(usr.loc)
view() << "[usr] dropped \a [src]!"
del src
return


Problem description:

The verb is supposed to drop the object in the player's inventory onto the ground beneath them. However, when attempting to execute this verb in gameplay, I get a runtime. It doesn't drop.

runtime error: Cannot create objects of type /obj.
proc name: Drop (/obj/verb/drop)
usr: TrustyGun (/mob/player)
src: White Mignon Egg (/obj)
call stack:
Dropped Object (/obj): Drop()

Best response
Instead of deleting the item and creating a new one to drop it, you can just move the object to the player's location:

obj/verb/Drop()
src.loc = usr.loc

If for whatever reason you do wish to delete and recreate the object, you'll want to use new src.type() instead:

obj/verb/Drop()
new src.type(usr.loc)
src.loc = null

Oh! It works now, thanks.