Re: Trying to access room connected to room

From: Ryan (ed209@maxwell.iia2.org)
Date: 04/04/95


On Tue, 4 Apr 1995, Scott Francis wrote:

> On Tue, 4 Apr 1995, Ryan wrote:
> 
> > sh_int cur_room, count;
> > 
> > for (cur_room = ch->in_room, count = 0; cur_room && count < 2; 
> >      cur_room = EXIT(ch, door)->to_room, count++) {
> >   sprintf(buf, "%d", cur_room);  /* just for testing */
> >   log(buf);                      /* purposes :)      */
> > }
> > 
> > Not sure if this will work, like I said, I'm still wiping the crust out 
> > of my eyes (euk).
> > 
> room, but will not take me to the room next to that one....if there are

ack.. yeah I see the problem.  Ok here's one that will work.

sh_int cur_room;

for (count = 0; count < 2; ch->in_room = EXIT(ch, door)->to_room, count++) {
  look_at_room(ch, 0);
  sprintf(buf, "%d", ch->in_room);
  log(buf);
}

yeah this should work if I didn't overlook anything this time.  I didn't 
know that you wanted a character to move last time, so I rewrote this 
code to place ch in a different room each time.

Hope this Helps.

Ryan



This archive was generated by hypermail 2b30 : 12/07/00 PST