ID:268511
 
I'm working on a game where sonar is a vital aspect in surviving. In a popup window, I want it to show all "members" in a list. Also, I want it to show a variable, not just the list. I simply tried "[listname]" but it didn't work. Can anyone help me out? Thanks.

~Officer Falcon
Try making a function which returns the text required and stick that into the html code for the popup window.
mob/verb/sonar()
src<<browse("<html><head><title>Sonar</title></head><body>[sonar_html()]</body></html>","window=sonar")

mob/proc/sonar_html()
.=""
for(var/mob/M in listname)
.+="[M.name]<br>"
.+="<br>[variablename]"
In response to Loduwijk
The code works. Thanks for helping.

~Officer Falcon