ID:263266
 
Code:
mob
Stat()
var/list/TeamList = new()
if (usr.TeamNum != 0)
statpanel("Team")
for (var/mob/M in world)
if (M.TeamNum == usr.TeamNum && usr != M)
TeamList.Add(M.name)
if (length(TeamList) > 0)
TeamList += "--Yourself--"
stat("People in Team","[length(TeamList)]")
stat("[TeamList]")
else
stat("People in Team","[length(TeamList)]")
stat("-=Yourself=-")


Problem description:ok when i run the game create a team and look at the panel to see whos in it it displays /list how can i make it display the players that are in the list.

mob
Stat()
var/list/TeamList = new()
if (usr.TeamNum != 0)
statpanel("Team")
for (var/mob/M in world)
if (M.TeamNum == usr.TeamNum && usr != M)
TeamList.Add(M.name)
if (length(TeamList) > 0)
TeamList += "--Yourself--"
stat("People in Team","[length(TeamList)]")
stat("[TeamList]")
else


stat("People in Team")
for(var/m in TeamList)
stat(m)

stat("-=Yourself=-")


That should do the trick... I just took a quick look over your code and came up with that small change.

§atans§pawn
In response to Satans Spawn
What was it? You should really explain what he did wrong, or he'd probably make the mistake over again.
In response to CaptFalcon33035
List can't be showed as text, only if its transformed.
Lists have "/list" text as default, to see what in list you need to use for()
In response to Ripiz
ok i got it fixed, thanks for the help.
In response to Ripiz
Ripiz wrote:
Lists have "/list" text as default, to see what in list you need to use for()

Or stat() with a list as an argument. =D