ID:263183
 
Code:a Monster drops this corpse, and if you bury both of them you finish the quest
mob/var/Trollbros = 0
obj
Corpse
icon = 'turf.dmi'
icon_state = "corpse"
sellamount = 0
verb/Get()
set src in oview(0)
usr.contents+=new/obj/Corpse//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
del(src)
verb/Bury()
usr.contents-=/obj/Corpse//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
usr.Trollbros += 1
obj
Corpse2
icon = 'turf.dmi'
icon_state = "corpse"
sellamount = 0
verb/Get()
set src in oview(0)
usr.contents+=new/obj/Corpse2//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
del(src)
verb/Bury()
usr.contents-=/obj/Corpse2//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
usr.Trollbros += 1


Problem description:when I try to bury the corpses, I get:
runtime error: cannot remove from list
proc name: Bury (/obj/Corpse/verb/Bury)
usr: the lokit (/mob/You/Cleric)
src: Corpse (/obj/Corpse)
call stack:
Corpse (/obj/Corpse): Bury()


Dragon warrior2662 wrote:
Code:a Monster drops this corpse, and if you bury both of them you finish the quest
> mob/var/Trollbros = 0
> obj
> Corpse
> icon = 'turf.dmi'
> icon_state = "corpse"
> sellamount = 0
> verb/Get()
> set src in oview(0)
> usr.contents+=new/obj/Corpse//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
> del(src)
> verb/Bury()
> usr.contents-=/obj/Corpse//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
> usr.Trollbros += 1
> obj
> Corpse2
> icon = 'turf.dmi'
> icon_state = "corpse"
> sellamount = 0
> verb/Get()
> set src in oview(0)
> usr.contents+=new/obj/Corpse2//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
> del(src)
> verb/Bury()
> usr.contents-=/obj/Corpse2//This adds a mace to usr.contents *Note* always use the new var cause if you don't you will get nasty run time errors//
> usr.Trollbros += 1
>

Problem description:when I try to bury the corpses, I get:
runtime error: cannot remove from list
proc name: Bury (/obj/Corpse/verb/Bury)
usr: the lokit (/mob/You/Cleric)
src: Corpse (/obj/Corpse)
call stack:
Corpse (/obj/Corpse): Bury()

You're trying to remove a type from the list, as opposed to the corpse itself. Try this:
            usr.contents-=src

...As I assume you're trying to remove the corpse that you are accessing the Bury() verb from.

In addition, I am curious as to what oview(0) is supposed to represent. Perhaps you mean oview(1)? Or even view(0)?

Hiead

Hiead
In response to Hiead
Thank you ver much for helping me, and yes, it is a typo, it is suppossed to be oview(1)