ID:149229
 
just as an example . . .


mob
PC
Stat()
statpanel("Whatever")
for(var/N in some_list)
stat(N)
stat("[N.some_var]")


assuming all variables are valid and everything exists, how could I get the stat(N) and the stat("[N.some_var]") to appear on the same line?


using something like stat(N, "[N.some_var]") won't work either as I found out
Have you tried something like this?:

mob
Stat()
..()
statpanel("Players")
for(var/mob/M in world)
if(M.client)
stat("[M]","[M.var]")//Yes, the quoting matters in stat()
else
continue


Just an example.
In response to Nadrew
how would you show an icon though?

for everything I've done up until now, I've always just used stat(M) where M is the actual mob or obj

my problem is that I don't know how to combine the stat(M) (including icon) with other M.variables on the same line
In response to Gakumerasara
stat() has the following format:

stat(Name,Value)

If only one argument is sent, it becomes the Value argument.

The Name argument is displayed in the first column in red text. If you never use the Name argument on a particular panel, the "red column" is ommitted.

Value can be one of two types: text or an atom.

If Value is text, then it is just displayed in the second column as black text.

if Value is an atom, The Value.icon is displayed (in full 32x32 glory with correct icon_state, dir, and I think even overlays) at the left of the second column, followed by Value.name as black text. Value.suffix will display in a third column in blue text.

If you want to display extra information about an atom, you must change the name or suffix var, or display it on another stat line. Suffix is designed for this purpose
In response to Shadowdarke
that's just what I needed; thanks