Ok, I've been working on rooms and exits for who knows how long. I've been trying to get this to work out for quite some time now, I think I almost have it but I got two warnings when doing it.
Here is the code:
area/fountain
Entered()
usr << "Waaaaah! You land in a pile of straw."
return ..()
verb/north()
var/loc = locate(/area/gate) // Warning #1
area/gate
Entered()
usr << "You walk up to a large double doored gate."
return ..()
verb/north()
var/loc = locate(/area/gate) // Warning #2
The warrnings I recieved were:
Rooms.dm:6:loc :warning: variable defined but not used
Rooms.dm:13:loc :warning: variable defined but not used
The line for both warnings have been marked with comments. So far I'm trying to get one room, with one exit. If someone could please help me, I'd appreciate it very much.
ID:149654
![]() Mar 18 2002, 1:19 pm
|
|
![]() Mar 18 2002, 1:47 pm
|
|
It shouldn't be var/loc it should be usr.loc
|
Thank you so much, it worked just like I wanted it to, but there's one problem. When you exit the first room and enter the next I want it to say something just like the first room does. This is what my adjusted code looks like:
mob/Login() if(!usr.loc) Move(locate(/area/fountain)) return ..() area/fountain Entered() usr << "Waaaaah! You land in a pile of straw." return ..() verb/north() usr.loc = locate(/area/gate) area/gate Entered() usr << "You walk up to a large double doored gate." return ..() verb/say(msg as text) world << "[usr] says [msg]." Unfortunately, when you go to the gate, it doesn't say "You walk up to a large double doored gate." Can you tell me what I would do to fix that? |