ID:144994
 
I've been trying as hard as possible to figure out what to do here and was hessitant to post in case it was because of something stupid. I rather just have it answered -_-

Code:

turf/BarberH
Luffy_Hair
icon='Luffy Hair.dmi'
icon_state = ""
layer=MOB_LAYER+2
density=1
Click()
switch(input("Are you sure this is what you want?", "Cut my Hair", text) in list ("Yes","No"))
if("Yes")
usr.overlays -= 'Luffy Hair.dmi'
usr.overlays -= 'Sanji Hair.dmi'
usr.overlays -= 'Zoro Hair.dmi'
usr.overlays -= 'Afro Hair.dmi'
usr.overlays -= 'Shanks Hair.dmi'
usr.overlays -= 'Girl Hair1.dmi'
usr.overlays -= 'Fancy Hair.dmi'
usr.overlays -= 'Crescent Hair.dmi'
usr<<"<font color=purple>The Barber begins cutting your hair</font>"
usr.freeze=1
sleep(100)
usr.freeze=0
usr<<"<font color=purple>The Barber finishes cutting your hair</font>"
usr<<"<font color=purple>The Barber begins dying your hair</font>"
var/new_rgb = F_Color_Selector.Get_Color(src)
var/icon/I = new('Luffy Hair.dmi')
I.Blend(new_rgb)
src.overlays += I



Problem:

When I compile it, it goes well. However when I actually get to that portion I get this error.


runtime error: undefined variable /turf/BarberH/Luffy_Hair/var/client
proc name: Get Color (/f_color_selector_handler/proc/Get_Color)
usr: Charlesg154 (/mob)
src: /f_color_selector_handler (/f_color_selector_handler)
call stack:
/f_color_selector_handler (/f_color_selector_handler): Get Color(Luffy Hair (346,37,2) (/turf/BarberH/Luffy_Hair))
Luffy Hair (346,37,2) (/turf/BarberH/Luffy_Hair): Click(Luffy Hair (346,37,2) (/turf/BarberH/Luffy_Hair))
runtime error: bad icon operation
proc name: Blend (/icon/proc/Blend)
usr: Charlesg154 (/mob)
src: /icon (/icon)
call stack:
/icon (/icon): Blend(null, null)
Luffy Hair (346,37,2) (/turf/BarberH/Luffy_Hair): Click(Luffy Hair (346,37,2) (/turf/BarberH/Luffy_Hair))



I'm still pretty much a rookie coder and don't know a lot about what I'm doing ^_^;;. Anyway I would appreciate any given help, thanks.
Instead of using src in F_Color_Selector, use usr.
In response to Gumshoe
Worked perfectly thanks a lot =D.