ID:147522
 
I know my problem is in one of these two lines, because the biography is always displayed to M after clicking the Topic() link. What's wrong with this topic link that's causing it?
html_doc += "<a href=?src=\ref[M];action=viewrpbio>View [M]'s RP bio.</a>"
src << browse(html_doc, "window=bioview;size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
Topic() is one of those few places where it is safe to use the dread usr. Using the link in your snippet, you want to display M's bio to usr in M's Topic() proc.
In response to Shadowdarke
Well, what I'm doing is adding specified HTML parameters to a variable, then displaying the contents of the variable in a popup window, and the call to the topic proc is a link in that popup; my guess is that I've got who's calling it and who's being read flip-flopped.
View_Bio_2(mob/M in view())
set name = "View Bio "
set category = null
CheckAFKIdle(src)
if(!M.client) return
var/mob/html_doc = "<html>"
html_doc += "<title>[M]'s RL biography</title>"
html_doc += "<body bgcolor=\"black\" text=\"white\">"
if(!M.rl_pic && !M.rl_name && !M.rl_age && !M.rl_sex && !M.rl_location && !M.rl_interests && !M.rl_desc)
html_doc += "<center>[M] has not specified any RL details.<br></center>"
html_doc += "<a href=?src=\ref[M];action=viewrpbio>View [M]'s RP bio.</a>"
src << browse(html_doc, "window=bioview;size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")
return
if(M.rl_pic)
html_doc += "<img src=\"[M.rl_pic]\"> <br>"
else
src << browse_rsc(nopic, "nopic.png")
html_doc += "<img src=\"nopic.png\"> <br>"
html_doc += "Name: [html_encode(M.rl_name)] <br>"
html_doc += "Age: [html_encode(M.rl_age)] <br>"
html_doc += "Gender: [M.rl_sex] <br>"
html_doc += "Location: [html_encode(M.rl_location)] <br>"
html_doc += "Interests: [html_encode(M.rl_interests)] <br>"
html_doc += "Description: [html_encode(M.rl_desc)] <br>"
html_doc += "<a href=?src=\ref[M];action=viewrpbio>View [M]'s RP bio.</a>"
src << browse(html_doc, "window=bioview;size=300x300;border=0;can_close=1; can_resize=1;can_minimize=1;titlebar=1")