var/hairtype = input("What kind of hair do you want?") in list("1","2","3","4","5","6")
var/r = input("How much red do you want in your hair?") as num
var/g = input("How much green do you want in your hair?") as num
var/b = input("How much blue do you want in your hair?") as num
switch(hairtype)
if("1")
var/obj/hair/h1/R = new()
R.icon += rgb(r,g,b)
new_mob.overlays += R
if("2")
var/obj/hair/h2/R = new()
R.icon += rgb(r,g,b)
new_mob.overlays += R
if("3")
var/obj/hair/h3/R = new()
R.icon+= rgb(r,g,b)
new_mob.overlays += R
//And so on...
Problem description:
runtime error: Cannot read null.overlays
proc name: CreateCharacter (/mob/creating_character/proc/CreateCharacter)
source file: Login.dm,33
usr: Paynekiller (/mob/creating_character)
src: Paynekiller (/mob/creating_character)
call stack:
Paynekiller (/mob/creating_character): CreateCharacter()
Paynekiller (/mob/creating_character): Login()
Well isn't this lovely? My newbish side is showing.
The problem appears to be when I choose the hair, and it won't read the overlays to new_mob. I mean, that was supposed to work, right? Or did I overlook something? Someone gimme a hint, please.
var/mob/new_mob
Maybe if you posted more of the code we could help you easier.
-Exophus