turf
hair
icon = 'hair.png'
density = 1
layer = 21
Click()
var/mob/M=usr
if(!M) return
if(M.hairselected == 1)
M<<"<font size=1><font color = purple><b>Your current hair has been deleted.</b></font>"
M.Gethair()
if(M.hairselected == 0)
M.Gethair()
mob
proc
Gethair()
var/hairoptions = list("bald","bald2","bald3")
var/hairchoice = input(hairoptions)
var/mob/M=usr
if(!M) return
if(hairchoice == "bald")
M<<"you're bald"
if(hairchoice == "bald2")
M<<"you're bald2"
if(hairchoice == "bald3")
M<<"you're bald3"
M.hairselected = 1
Problem description:
Compiles fine, runtime error;
runtime error: bad client
proc name: Gethair (/mob/proc/Gethair)
usr: CYN (/mob)
src: CYN (/mob)
call stack:
CYN (/mob): Gethair()
the hair (23,14,2) (/turf/hair): Click(the hair (23,14,2) (/turf/hair))
This is a better version:
I'd prefer this one:
Albeit not using your same method of clicking the hair itself, it does provide you with a clean and efficient way of changing your hair style and even colorize your hair.