Yeah, I'd put this in Code Problems, but again, I feel this is a lame question, so, I was wondering what a good who code is. I'm trying to use this, but it's really not working for me. Thanks a lot.
client/verb
who()
var/mob/M
usr<< "People On:"
for(M in world)
if(M == usr) continue
if(M.key) usr << M.key
The indents got a bit messed up.
ID:267656
Aug 10 2003, 4:34 pm
|
|
I can see that the indents have mucked up :\, there is nothing wrong with this:
client/verb so i dont know why it isnt working for you (oh you should add an && to the thing and check if it is a client, incase it logged out some how leaving a mob intact) |
In response to Wanabe
|
|
Ah, well, no matter how I play with it, it's being a little bastard and telling me I got indentation problems. I'll keep messing with it I guess... :' (
|
In response to SSJ2GohanDBGT
|
|
It's these f'ing indentations..
|
In response to Rockin' Eli
|
|
You need to pay close attention to when things need to be indented. The first ZBT tutorial has an excellent explanation of indentation.
Because I'm feeling nice, I'll fix the indentation for you. <code>client/verb who() <font color=blue>//indented once</font> var/mob/M <font color=blue>//indented twice</font> usr<< "People On:" <font color=blue>//also indented twice</font> for(M in world) <font color=blue>//again, twice</font> if(M == usr) continue <font color=blue>//In a for loop, so indent it again; it's now indented three times</font> if(M.key) usr << M.key <font color=blue>//also indented three times</font></code> |
In response to Crispy
|
|
Wow, thank you very much.
|
who()
var/mob/M
usr<< "People On:"
for(M in world)
if(M == usr) continue
if(M.key) usr << M.key
That should work
James