ID:268996
 
var/icon/Q = icon('items.dmi',
"[vial.containing]")
Q += rgb(src.rgb[1],src.rgb[2],src.rgb[3])//Error here

=/ I get a type mismatch when doing that...and, yes, I set the obj's RGB to a number.

(I made a rgb list, var/list/rgb[3])

Well, thanks for reading.
Q.Blend(rgb(rgb[1],rgb[2],rgb[3],ICON_ADD)


Q is an icon OBJECT, thus cannot have rgb() added to it with an operator. When you have an initialized icon object, use the Blend() procedure.
In response to Ter13
Ahhh...another beautiful feature with Blend. :)
Thanks, Ter.
I think you're also likely to experience problems with a var named rgb, as opposed to RGB. Sometimes naming vars after built-in procs is bad. This isn't always the case, but it is for block and probably a few others.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
I think you're also likely to experience problems with a var named rgb, as opposed to RGB. Sometimes naming vars after built-in procs is bad. This isn't always the case, but it is for block and probably a few others.

Lummox JR

Yeah, I thought of that...I knew it would have something tacky along the ride. :p
Thanks, Lummox for the info.