ID:2146545
 
I'm trying to do something nice and simple. I've done it a hundred times before, yet it's not working, but I can't figure out what I'm doing wrong.
Code:
var/icon/i = new('exampleicon.dmi',"examplestate")
user << output(i,"default.exampleoutputgrid")
user << output("Test Message","default.exampleoutputgrid")
user << i
usr << "Test Message"


Problem description:
No icon appears in the grid, or the output, yet the text appears perfectly! It just puts an empty line where the icon should go. What am I doing wrong?
Usually, when you have an icon that you want to be displayed, you need to convert it to a resource with fcopy_rsc(). There are times when this is done automatically for you, such as when you set an atom's icon directly to an /icon object, but there are other times where you have to do it explicitly.
var
icon/i = ...
r = fcopy_rsc(i)

When you want to display an icon in an Output element, you have to use the \icon text macro, like so:
user << "\icon[r]"
Hmm... that seems to work, but the icon is showing up tiny. Is there any way to make it show a full sized icon, like when you output an obj or mob?
In response to Maxiemo
You could always look up the icon text macro in the DM Reference that's built into Dream Maker.