ID:167429
 
The errori I get is...
Login.dm:15:error:usr.o.icon:undefined var

Why?
mob
Login()
o = new/obj/Hair
overlays += o
var
o
obj
Hair
var/setting = "0,0,0"
icon='Hair.dmi'
layer=MOB_LAYER+1
pixel_y=40
turf
Buttons
icon='Login.dmi'
Left_22
icon_state = "Left-2,2"
Click()
if(usr.o)
world<<"Checking Top_left"
usr.o.icon += rgb(0,20,20)
// usr.o.setting = "20,0,0"
world<<"Changing Hair Color!"
if(usr.Hairoverlay == 0)
usr.Hairoverlay = 1
Where do you define "o"? Could you show that code?
Why isnt it refrencing the o?
In response to Strawgate
usr.o.icon


o doesn't have an icon try

usr.o += rgb(0,20,20)


I think that may work i don't see why not
In response to A.T.H.K
Then I get a runtime error

runtime error: type mismatch
proc name: Click (/turf/Buttons/Left_12/Click)
usr: Strawgate (/mob)
src: Left 12 (4,3,1) (/turf/Buttons/Left_12)
call stack:
Left 12 (4,3,1) (/turf/Buttons/Left_12): Click(Left 12 (4,3,1) (/turf/Buttons/Left_12))


turf
Buttons
icon='Login.dmi'
Left_22
icon_state = "Left-2,2"
Click()
world<<"Checking Top_left"
usr.o += rgb(0,20,20)
// usr.o.setting = "20,0,0"
world<<"Changing Hair Color!"

Output:
runtime error: type mismatch
proc name: Click (/turf/Buttons/Left_12/Click)
usr: Strawgate (/mob)
src: Left 12 (4,3,1) (/turf/Buttons/Left_12)
call stack:
Left 12 (4,3,1) (/turf/Buttons/Left_12): Click(Left 12 (4,3,1) (/turf/Buttons/Left_12))

Checking Top_left
In response to Strawgate
Use this;
mob/var/obj/o
...
var/obj/a = new/obj/hair
usr.o=a