ID:178440
 
i need help on a Who verb, it wold show everyone's name and key like, Redslash, key = Redslash but for everyone in the world. thx!
mob/verb/who()
for(var/mob/M in world)
if(M.client)
usr << M
In response to Sariat
how would i get it to say their key too?
In response to Redslash
Redslash wrote:
how would i get it to say their key too?

mob/verb/Who()
var/mob/M
for(M in world)
if(M.client)
usr <<"Connected:"
usr <<"[M] Name:[M.name](Key = [M.key])"


-Kappa the Imp
In response to Kappa the Imp
kappa, that gave me this,

runtime error: Cannot read null.client
proc name: Who (/mob/verb/Who)
usr: RSsGeomancer (/mob/RSsGeomancer)
src: RSsGeomancer (/mob/RSsGeomancer)
call stack:
RSsGeomancer (/mob/RSsGeomancer): Who()
In response to Redslash
indent the if statement, and the two directly below it.
mob/verb/Who()
var/html = {"
<font size=+3>Players</font>
<table border=1>
<tr><td>Name</td><td>Key</td></tr>
"}

var/htmladd
for(var/mob/M in world)
if(M.client) htmladd += "<tr><td>[M.name]</td><td>[M.key]</td></tr>"
html += htmladd
html += {"
</table>
<small>End of who.</small>"}

src << browse(html)
In response to Skysaw
this worked for me

mob/verb/who()
for(var/mob/M in world)
if(M.client)
usr <<"People Online"
usr <<"[M.name]([M.key])"


u can change the dfont color and the postition ythough
In response to Magnus VI
Magnus VI wrote:
this worked for me

mob/verb/who()
for(var/mob/M in world)
if(M.client)
usr <<"People Online"
usr <<"[M.name]([M.key])"


u can change the dfont color and the postition ythough

That's an interesting approach. Why would you want to print "People Online" before each and every person?