ID:140254
 
Code:
proc
distRanks()
var/mob
comp
cond
prod
reap1
reap2
player

for(comp in inGame)
if(composer.len == 1)
return ..()
else
world<<"[comp] is the composer."
composer.Add(comp)
for(cond in inGame)
if(conductor.len == 1)
return ..()
else
world<<"[cond] is the conductor."
conductor.Add(cond)
for(prod in inGame)
if(producer.len == 1)
return ..()
else
world<<"[prod] is the producer."
producer.Add(prod)
for(reap1 in inGame)
if(reapers.len == 2)
return ..()
else
world<<"[reap1] is a reaper."
reapers.Add(reap1)
for(reap2 in inGame)
if(reapers.len == 2)
return ..()
else
world<<"[reap2] is a reaper."
reapers.Add(reap2)


Problem description:
Well, here's the thing. I have approx. 5 lists, all of which are:
- composer
- conductor
- producer
- reapers (holds 2)
- and players

The code above, only works for the Composer. I have about 4-5 people online helping me test, but they don't get a rank when the game starts. What could the problem be?

* Extra bonus points if you can help me figure out why this shows /list instead of the contents of the list. * :P

var/list/players=list() // players in the UG stored here.
stat("Players:",players)


Yes, I do add them to the list using players.Add(arg).
1) Because return breaks out of the entire proc. You probably want break instead.

2) Because the output of a list object is "/list". If you want to DISPLAY the list, you need to loop through each element, or use statpanel().