mob/var/list/darkness = newlist(/obj/black,/obj/black2,/obj/black3,/obj/black4,/obj/blackTR,/obj/blackTL,/obj/blackBR,/obj/blackBL,/obj/blacktop,/obj/blackbottom,/obj/blackright,/obj/blackleft)
bed
icon = 'Icon Sheet 1.dmi'
icon_state= "bed"
verb
Sleep()
set src in oview(1)
usr.sleep = input("Would you like to go to sleep?") in list ("Yes","No")
if(usr.sleep == "Yes")
usr << "You fall asleep and enter the Dream World."
usr << sound(null)
usr << sound('calmtheme.ogg')
usr.client.screen += darkness
usr.Move(locate(6,6,2))
mob/verb
Wake_Up()
if(usr.sleep == "Yes")
usr.Move(locate(1,8,1))
usr.sleep = "No"
usr.client.screen -= darkness
else
usr << "You are already awake!"
Problem description: I have defined a list (of objects) under mob/var, and I am trying to call the same list in a verb under /obj/bed.
Included between the (dm) above I included a Wake_Up() verb under /mob that calls the list, and gives no errors.
When compiling, the error given is "error: darkness: undefined var" on the line under the Sleep() verb.
Why does it have a problem with the list when it is called under an obj verb but not under a mob verb.
Can someone please explain this?
Thanks again,
Balt