ID:1277167
 
(See the best response by DarkCampainger.)
How do I put a var icon into a html document for the browser in the game?

<img src=\"[src.who_avatar]\">


I thought that might work, but it doesn't. >.<
Best response
If you use browse_rsc() to send the image to the player, you can specify a file name for it. Then you use that file name in the src argument of your <img> tag. You'll probably want to base the file name on the player's ckey (or name, if keys are meant to be private), to prevent collisions.
I have a html panel for the users "stats" for the game. And I would like them to be able to have a picture avatar above there name. This is what I am trying to do. Each player has there individual names and it is saved by there name and not there key. So, to be honest I am not sure how to do this. I have the html all completed with tables and stuff but my problem is the avatar. So if you can give an example I would appreciate it.
<html>
<img src=\"[src.who_avatar]\">
Ripper man5


HP: 10
ect....

</html>
In response to Ripper man5
A basic example would be:

mob/verb/Stats()
// Generates an image named after the src's ckey from their current icon and icon_state, then puts it in the resource cache.
src << browse_rsc(icon(icon, icon_state), "[ckey].png")

// We show the image here.
var html = "<html><body><img src=\"[ckey].png\"><br>[name]</body></html>

src << browse(html)
Thank you DarkCampainger and LordAndrew.
http://www.byond.com/forum/?post=34078&hl

This is a longish tutorial on browse() and html forums in-depth might be worth you looking