ID:2127351
 
Code:
DeathCheck(mob/M)
if(M.hp<=0)// if the hp's 0
src.contents = M.contents//give mobs contents to killer
usr << "You receive [M.contents]"//tell them what they got
del(M)///delete the npc frmm the world
src.exp+=rand(10,30)/// give exp
src.Level()// call the lvl proc
return/// stop runtime errors

Rat
icon = 'npc.dmi'
icon_state = "rat"
hp=10
def=0
npc=1
contents = newlist(/obj/item/rattail)


Problem description:
I want to tell the pc what they received after killing a mob but when they kill someone it says you received /list ; how could i go display the objects instead of list?
jointext() is the simplest option, for the simplest of list formatting.

Comma-separated sequence:
src << "You receive: [jointext(M.contents, ", ")]"

Bulleted list:
src << "You receive:"
src << "* [jointext(M.contents, "\n* ")]"
src.contents = M.contents//give mobs contents to killer


You should be adding to your contents list, not overwriting it with the defeated mob's contents.
Thanks Kaiochao and FKI i missed that! would have been bad

certainly going back to rereading the list chapter on the guide
In response to William1of89
William1of89 wrote:
certainly going back to rereading the list chapter on the guide

The DM Guide can help you get the general syntax of the language, but you're better off using the DM Reference (F1 in Dream Maker) if you just want to know what certain objects and functions do.
In response to Kaiochao
thanks for the advice will certainly look in to it more