In response to Blueseed15
obj/ListShower
Click()
if(usr.bShowOnline)
usr.bShowOnline = FALSE //or 0
return
else
usr.bShowOnline = TRUE //or 1

New()
src.loc = null //moves it to the void on creation

mob/var/MyListShower = new(obj/ListShower)
mob/Stat()
statpanel("Online")
stat(MyListShower)

if(bShowOnline)
for(var/client/C in world)
stat(C)

In response to Aridale
Dont copy/paste this cause its not from DM I typed it in the reply so its no tabbed or anything. Also it might need a lil work cause like I said I didnt actually make it in DM and compile it so I dunno if it'll work 100% like in my mind it does.

In response to Aridale
Fairly close.

Aridale wrote:
mob/var/MyListShower = new(obj/ListShower)

Firstly, that's not a correct use of new(). Secondly, you'll get an "expected a constant expression" error on this line. Instead, do this:

<code>mob/var/obj/ListShower/MyListShower mob/New() .=..() MyListShower = new()</code>

mob/Stat()
statpanel("Online")
stat(MyListShower)

if(bShowOnline)
for(var/client/C)
stat(C.mob)

This is nearly right, except you'll probably want to display the mob rather than the client. And "var/client/C in world" won't work, because the clients are not in the world; it's just "var/client/C".

EDIT: Whoops, forgot to remove "in world" from the client loop. Thanks Loduwijk!
In response to Crispy
well like I said I didnt actually make it in DM =)
In response to Aridale
Sure, fair enough.
In response to Airjoe
for(var/client/C in world) shouldn't work at all. client's are not in the world, just their mobs are. The only thing that is actually in world are things that are subclasses of /atom. The world has various areas, and the areas have 1 or more turfs in them which are arranged in a cube pattern. /atom/movable then go on the turfs, this includes both mobs and objs. (mob and obj can also be in other mob or obj)

That is how the byond world goes 'round. Types /client and /list are not even derived from /datum yet, it would be difficult to put them on the world if you wanted to.
In response to Crispy
OK, thank you... I'll test it later...
Page: 1 2