ID:142341
 
Code:
client
Topic(href,list/href_list)
..()
var/action = href_list["action"]
var/mob/base/b = href_list["value"]
switch(action)
if("ship")
//usr.client.mob = v
if("Cancel")
usr << browse(,"window=name")
b.Docked(usr)
else
return ..()
proc
Hanger(var/mob/base/s)
usr << browse_rsc('hangerback.jpg',"Hanger.jpg")
var/Hanger = {"
<HTML>
<head><title>Hanger</title></head>
<STYLE>BODY {background: black; color: white;}</STYLE>
<body>"}

var/count = 0
for(var/mob/character/vessle/v in usr.client.Hanger)
usr << browse_rsc(icon(v.icon,v.icon_state,SOUTH),"micon[count]")
//Hanger += {" <a href=?src=\ref[src];Hanger=ship & b=\ref[s]><img src=micon[count]>[v.name]</a> "}
if(usr.client.mob == v)
Hanger += " <b>Current</b>"
Hanger += "<br>"
count++

Hanger += {"<br><center><a href='?src=\ref[src];value=\ref[s];action=Cancel'>Cancel</a> </center>
</body>
</HTML>
"}

usr << browse(Hanger,"window=name;file=name;display=1;size=300x300;border=0;can_close=0;can_resize=0;can_minimize=0;titlebar=0")


Problem description:

I have a problem calling the Docked proc, I keep getting an error stating that cant execute null.Docked()
Try changing
        var/mob/base/b = href_list["value"]


to
        var/mob/base/b = locate(href_list["value"])
In response to Nickr5
thx a bunch
In response to Theosco
This should be explained, though, so you will learn and know what your problem was and how to deal with such things yourself in the future. Your problem was that you were trying to use the value returned by the \ref macro as an actual object reference, but it is in fact a text string containing a unique identifier for it. The reference for that object can be found using the text string (hence it being an identifier), and has to be before you can do anything with that object (otherwise, you're trying to mess with the text string!). This is where the locate() proc comes in - it takes the unique identifier string and returns the actual object it refers to.
In response to Kaioken
oh, thx for the info, ill remember that