rgb() in Overlays (special list) in Developer Help
|
|
Code:
mob barber DblClick() if(!(src in oview(1))) return 0 switch(input("What hair style would you like me to do for you today?")in list("Bald", "Gaara - 10", "Chouji - 10", "Nothing")) if("Bald") usr.removehair() usr.removehair() if("Gaara - 10") if(usr.Yen >= 10) usr.Yen -= 10 usr.removehair() var/obj/hairs/GaaraHair/a=/obj/hairs/GaaraHair usr.crgb(a)
mob/proc/crgb(obj/a) var/r=input(src,"How much red should the hair have? Between 0 and 255!") as num var/g=input(src,"How much green should the hair have? Between 0 and 255!") as num var/b=input(src,"How much blue should the hair have? Between 0 and 255!") as num if(r>255) r=255 if(r<0) r=0 if(g>255) g=255 if(g<0) g=0 if(b>255) b=255 if(b<0) b=0 a.icon+=rgb(r,g,b) src.Overlays+=a src.update()
|
Problem description: Runtime error that it can't read /obj/hairs/'whateverhairIpicked'.icon
This sounds quite obvious, but I have no clue how to fix it. As you can see, I'm using 'Overlays' instead of 'overlays', being it that it's handyer and doensn't mess up overlays.
Any thoughts?
|