Re: [CODE] Typing not the whole obj/moc/cha name

From: Alex DaCosta (alexman@samnet.com.br)
Date: 03/01/02


> What I meant was, when you "force mob give sword goddude" or whatever,
> once it's been given to you and you stat the object does it show the
> proper alias list?  If you're REALLY running out of clues, this might
> help:
>
> --- src/handler.c       Sun Jan 13 16:46:14 2002
> +++ src/handler.c.new   Mon Feb 18 10:26:04 2002
> @@ -1135,10 +1135,13 @@ struct obj_data *get_obj_in_list_vis(str
>      return (NULL);
>
>    for (i = list; i && *number; i = i->next_content)
> +         log("%s: ch: %s name %s i->name %s", __FUNCTION__, GET_NAME(ch),
name, i->name);
>      if (isname(name, i->name))
> -      if (CAN_SEE_OBJ(ch, i))
> +      if (CAN_SEE_OBJ(ch, i)) {
>         if (--(*number) == 0)
>           return (i);
> +      }
> +      else log("%s: ch can't see object %s", __FUNCTION__, GET_NAME(ch),
i->name);
>
>    return (NULL);
>  }

Well... take a look at this. I added the code above to check what's going
wrong. But with one little change. Once I had a trouble using the
"__FUNCTION__," argument, I replaced it with a little string : "Function".
So, see what I got :

/*I started running my MUD. */

Log >
Mar 01 21:01:53 :: Eru [127.0.0.1] has connected.
Mar 01 21:01:54 :: Eru un-renting and entering game.
Mar 01 21:01:54 :: Eru (level 34) has 0 objects (max 30).

/*Then, I went to King Welmar, and gave a command at the MUDPrompt :*/

MUDPrompt >
force welmar rem all

Log>
Mar 01 21:02:58 :: Function: ch: King Welmar name door i->name key
Mar 01 21:02:58 :: Function: ch: King Welmar name door i->name key
Mar 01 21:03:18 :: Function: ch: King Welmar name door i->name key
Mar 01 21:03:18 :: Function: ch: King Welmar name door i->name key
Mar 01 21:03:37 :: (GC) Eru forced King Welmar to rem all

MUDPrompt>
force welmar giv crown eru

Log>
Mar 01 21:05:15 :: (GC) Eru forced King Welmar to giv crown eru
Mar 01 21:05:15 :: Function: ch: King Welmar name crown i->name sceptre
royal go
lden
Mar 01 21:05:15 :: Function: ch: King Welmar name crown i->name crown golden

MUDPrompt>
wear crown

Log>
Mar 01 21:05:55 :: Function: ch: Eru name crown i->name crown golden

/*Everything was right. I removed, dropped, get it again. Now, let's
disconnect and return to see what happens :*/

Log>
Mar 01 21:07:06 :: Eru has quit the game.
Mar 01 21:07:16 :: Eru un-renting and entering game.
Mar 01 21:07:16 :: Eru (level 34) has 1 object (max 30).

/*Now, the crown was in my inventory ... let's use some commands ...*/

MUDPrompt>
drop crown
You don't seem to have a crown.

Log>
Mar 01 21:08:33 :: Function: ch: Eru name crown i->name TIME

Usage: time

Gives you the current game time.  Your initial reaction to the output of
this command may be one of surprise, but you'll get used to it.  You'll
have to, at any rate, since certain things in the game depend on this
particular notion of time; the opening hours of the shops, for example.

/*Oh, what the hell we have here? Let me see a thing :*/

MUDPrompt>
drop all
You drop a golden crown.

MUDPrompt>
get all
You get a golden crown.

MUDPrompt>
wear time
You wear a golden crown on your head.

Log>
Mar 01 21:13:35 :: Function: ch: Eru name time i->name TIME

Usage: time

Gives you the current game time.  Your initial reaction to the output of
this command may be one of surprise, but you'll get used to it.  You'll
have to, at any rate, since certain things in the game depend on this
particular notion of time; the opening hours of the shops, for example.

/*Well, I'ml ending this set of tests up. Sure the code line I'd added help
us to see where's the problem. But I know not how to correct this BUG yet!

That's all. Thanx a lot

Alex*/

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT