ID:645409
 
(See the best response by DarkCampainger.)
Code:
mob/monsters
monster
level=1
picture="/asdf.jpg"

var/monsterview = {"
<html>
<head><title>Monster</title></head>
<body bgcolor=#000000>
<img src=
[M.picture]>//image
<a href=
[M.picture]>[M.picture]</a>//direct image link
</body>
</html>
"}

usr<<output(monsterview,"monster.browser")


Problem description:
The image in the code does not display in the browser. The image is in the same directory as the rsc. I tried linking to the image directly, which revealed that the path in the link leads to: file:///C:/asdf.jpg
How can it be made to reference the image file in the game folder?
Well I used to do it this way.

var/html_doc = "<head><title>Announcment</title></head><body bgcolor=#000000 text=#FFFFFF><center><B><U><font color = red><font size=1><font face=Verdana>Announcement</U><BR>From: [usr]</font><BR><BR><font face=Verdana><font color=COCOCO>[message]"
world << browse(html_doc,"window=Announce")


Might not be the best way to do it but it works
Best response
You need to use browse_rsc() to first send the client(s) the file before you can display it in a browser.

You'll also want to specify the file with single quotes instead of the double quotes you're using (to make sure the file is included with the RSC). You also shouldn't start the filename with a slash (which is why it's thinking the file is in your root directory).
My code works now. It looks like this:

mob/monsters
monster
level=1
picture='asdf.jpg'

var/monsterview = {"
<html>
<head><title>Monster</title></head>
<body bgcolor=#000000>
<img src=
[M.picture]>//image
<a href=
[M.picture]>[M.picture]</a>//direct image link
</body>
</html>
"}

usr<<browse_rsc(M.picture,"[M.picture]");usr<<browse(monsterview,"monster.browser")


Taking away the / caused the game to reference the byond cache, and browse_rsc sent asdf.jpg to the cache so it could be properly displayed. Using usr<<browse instead of usr<<output probably helped too.
Thank you so much for the help!