Special Procs

From: Carl Tashian (TASHIACM@ctrvax.Vanderbilt.Edu)
Date: 02/06/94


I'm having some problems with my special procedures...

I've decided to try to write a "teleporter" room for my MUD... so I wrote
this and put it in spec_procs.c:

SPECIAL(transport)
{
  int rnwhereto = number(1,3);
  int whereto = 0;

  ACMD(do_look);

  if (IS_NPC(ch) || (cmd != 302))
    return(FALSE);

  switch(rnwhereto) {
    case 1:
       whereto = 3001; break;
    case 2:
       whereto = 12032; break;
    case 3:
       whereto = 7009; break;
    }

  act("$n presses a button on the transporter, and disappears.", TRUE, ch, 0,
0, TO_ROOM);
  send_to_char("You press a button on the transporter..\n\r", ch);
  char_from_room(ch);
  char_to_room(ch, whereto);
  send_to_char("...and suddenly, you're somewhere else!\n\r", ch);
  act("$n arrives from the transporter.", TRUE, ch, 0, 0, TO_ROOM);
  do_look(ch, "", 15, 0);
  return(TRUE);
}

cmd 302 is "transport" .. and special(transport) is assigned correctly in
spec_assign.c.. but when I type transport in that room, I get this:

| 500H 100M 82V > transport
You press a button on the transporter..
...and suddenly, you're somewhere else!
 (#26990) [ DARK DEATH LAWFULL NEUTRAL CHAOTOC TUNNEL GODROOM UNDEFINED
UNDEFINE
D ]

  (linkless) is lying here, dead.


And then a crash.. Anyone know what I have done wrong here?



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