ID:140269
 
Code:
proc/online()
for(var/M in world)
usr << "[M]"

var/onlineusrs
online()

mob/verb/view_more_detailed_log()
set desc = "View the more detailed log";
var/HTML = {"
<html>
<center>
<body bgcolor=blue>
<span style='color:white;'>
<head><title>Log Files System</title></head>
<h1><u>more detailed log file</u></h1>
<br><br>
<b>Text:</b>
[text]<br>
<b>Online:</b>
[onlineusrs] <br>
</span>
</center>
</html>
"}

src << browse(HTML,"window=Detailed Log; size=300x600")


Problem description:

It comes up with a onlineusrs : undefined var. I used copied the var name so there shouldn't be any typos.

Thanks in advance.
You cannot set a variable to be a proc. Why you get an "undefined variable" error rather than a major syntax error is puzzling but ultimately irrelevant.
In response to Garthor
Thanks, but I tried doing that because this doesn't work:

var/onlineusrs
for(var/M in world)
usr << "[M]"


It comes up with the following error:

demo.dm:28:error: usr: undefined var
demo.dm:27:error: in: expected 1 argument to 'in'
demo.dm:27:error: for: invalid variable name: reserved word
In response to Blafblabla
You can't do that, either.
In response to Garthor
That's what I said in my last post, because that didn't work, I tried the other one. How would I get this to work?
In response to Blafblabla
You cannot use a variable to do what you want. If you want a list of players, generating it from within the proc is going to be easier.

Also note that looping through everything in the world is not going to give you a list of players. Loop through every client (for(var/client/C)) instead.
In response to Garthor
Thanks.