DblClick()
var/c = input("What would you like to purchase? Everything is 10 Ryo today! You have [usr.ryo]") in list ("T-Shirt","Fishnet","Tuxedo","Sandals","Bandages","Cloak","Pants","Cancel")
if(c=="T-Shirt")
if(usr.ryo<10)
return
if(usr.ryo>=10)
usr.ryo-=10
var/obj/clothing/p = new/obj/clothing/Shirt
usr.contents:Add(p)
var/r = input("How much red?") as num//set its red amount
var/g = input("How much green?") as num//set its green amount
var/b = input("How much blue?") as num//set its blue amount
p += rgb(r,g,b)
runtime error: type mismatch: T-Shirt (/obj/clothing/Shirt) += "#640014"
proc name: DblClick (/mob/Clothing_Seller/DblClick)
source file: Vendor.dm,81
usr: Character (/mob)
src: Clothing Seller (/mob/Clothing_Seller)
call stack:
Clothing Seller (/mob/Clothing_Seller): DblClick(GrassD (66,187,4) (/turf/nturfs/GrassD), "default.map1", "icon-x=33;icon-y=36;left=1;scr...")
When I attempt to colour the T-Shirt, it spits out that error. What am I doing wrong to cause this?
EDIT:
You really shouldn't be using the 'Select r, b, g' method of setting a color either.