Code:
/obj/structure/garden/pot/updateicon()
if(!contain)
icon_state = "pot"
else
if(contain == /obj/item/decoration/flower/blue)
icon_state = "pot-blue"
if(contain == /obj/item/decoration/flower/red)
icon_state = "pot-red"
else
world << "<span class='notice'>[contain] found no acceptable sprite</span>"
And i always have no sprite for it. I even debugged it. It said, pot has "Blue flower" in it (which is /obj/item/decoration/flower/blue), but i got no acceptable sprite, again.
Where I did something wrong?
There's a few ways around this, using your current method you could do something like But that's probably bad practice. It'd be a far better idea to instead have a basic flower type, and a var which dictates which type it is (assuming they all have the same basic behaviour). Then you could just check that var instead, and it'd cut down on a whole bunch of programming if you decided to add say, another 10 flower types.