Problem with spec_proc

From: Chuck Carson (chuck@EDEN.COM)
Date: 05/02/98


I am having a strange problem with a special procedure. A spec_proc
nearly identical to this one worked in some older code of mine based
on pl 11, but my current codebase is pl 12.
I have an object of type OTHER called a wine cabinet. I have a spec_proc
that shoud transfer the player to another room if the right command is
entered. I have dummied the spec_proc down to a simple one argument
command to at least get that woring but I cannot.
I have defined a command in interpreter.c called "wine" that calls
do_not_here,
POS_STANDING, and 0,0 for the last two args.

Here is the spec_proc:

****************************************************************************
*
SPECIAL(wine_cabinet)
{
 struct obj_data *obj = (struct obj_data *) me;
 struct obj_data *wine;
 char obj_name[MAX_STRING_LENGTH];

 if(!CMD_IS("wine")) return FALSE;

 argument = one_argument(argument, obj_name);

 if (!(wine = get_obj_in_list_vis(ch, obj_name,
world[ch->in_room].contents)))
  return FALSE;

 if (wine != obj) return FALSE;

 if(GET_CLASS(ch) != CLASS_THIEF) {
   send_to_char("A hooded figure pushes you back out of the cabinet.\r\n",
ch);
   return FALSE;
   }

 act("$n slips into the wine cabinet and disappears.", TRUE, ch, 0, FALSE,
TO_ROOM);
 char_from_room(ch);
 char_to_room(ch, real_room(2612));
 look_at_room(ch, 0);
 return TRUE;
}
****************************************************************************
****
When I issue "wine" it responds with, "You cannot do that here" or whatever
the
do_not_here message is. What I do not get is that this exact spec_proc with
only the item name being different worked fine in my pl 11 code. What I want
is
for the player to type "enter cabinet" and be placed in room 2612. If this
cannot be
done due to the already existing "enter" command, I can think of something
else, but
I am currently just trying to get "wine" to work. The object exits, is
loaded and visible,
and a stat() says the spec_proc exists. (I know it somewhat works because at
one
point the procedure would transfer the player no matter what was typed as an
argument)

Thanks, WC


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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