ID:264990
 
Code:
monster
Death(mob/M)
world << "[src] died"
flags = null
loc=locate(0,0,0)
spawn(100)
src.loc=locate(src.oldx,src.oldy,src.oldz)
flags = initial(flags)
if(M.in_party == 1)
world << "[src] you are in a party"
var/amount
amount = src.Xp
var/list/party_in_oview = M.party & oview(M,8)
var/shared_gain = round(amount / party_in_oview)
for(var/mob/P in party_in_oview)
P << "You gain [shared_gain] XP."
M.Xp += round((src.Xp))
M.Level_up()


Problem description:

not working at all the monster died but the code stops at world << "[src] you are in a party"
It would help if you told us what you wanted the code to do.

party_in_oview is a list not a number, use party_in_oview.len
            var/list/party_in_oview = M.party & oview(M,8)
var/shared_gain = round(amount / party_in_oview)
In response to Ill Im
i want the code to when someone in a party kills a monster i want the party to share experince point with each other but its not working at all