ID:264585
 
Code:
mob/verb/Treasure()
set hidden = 1
var/icon/I = 'Chest Opened.PNG'
winset(src,"button5","image=\ref[I.icon]")


Problem description:
A hidden verb for a command on the interface. Players are presented with a window, a button of a closed treasure chest is displayed to them. When clicked it should trigger the treasure process and change the image to look like a opened treasure chest. But the image on the button remains the same, unchanged.

Try:
winset(src,"button5","image=\ref[I]")

I is already an icon, so you don't need I.icon...
In response to Tomy (#1)
No, that works just fine with labels. I am starting to think you just can't change the image of a button.
In response to Radical Designs (#2)
That should give you a runtime error since you're treating a cache file reference as an [/icon] object, which it isn't, therefore it has no vars.
If you make sure the file gets included as a cache file (by using it in single quotes somewhere), then just giving its filename should work here:
proc/include_rsc()
null << list('my file.png','my other file.png')

client/verb/set_image()
winset(src,"id","image='my file.png'")
In response to Kaioken (#4)
Well I haven't been. Up until now, working with labels it has worked just fine without any issues at all. It wasn't until I started playing around with buttons that it started to cause an issue.