[Code] Wierd Bug?

From: Mark Vanness Jr. (junior57@worldnet.att.net)
Date: 06/11/99


Here is a recent bug I ended up with on my MUD today
after putting in 2000 lines of code.

I have a call in my do_set similar to...

if(GET_IDNUM(ch) != 1)
  send_to_char("You can't!", ch);

Now my character's idnum is 1, and I get the
"You can't!" message.

Another example...  I have a call in another function
similiar to:

if (GET_LEVEL(vict) >= GET_LEVEL(ch))
  send_to_char("No!", ch);

I get the "No" message, in this case, I am LVL_IMPL
and the victim was level 4.....

My main question is, HOW do I track what is causing
this?  I am sure I can fix it if I knew what was causing the
problem.

Another funny thing in my code is..

  if(!*GET_CLAN_NAME(ch))
     send_to_char("You don't have a clan!", ch);

The above string, unlike the other 3, CRASH the MUD.

How can I track this?  I think it might be a memory leak somewhere,
but I can't figure out how to track the problem with GDB or otherwise.

If anyone can help, great thanks.

A Confused Programmer

-----------------------------------------------------------------------
Mark W. Vanness Jr.
Funcity - Technical Support
Junior57 Productions - President
-----------------------------------------------------------------------

Funcity - http://www.funcity.org
J57Prod - http://none.yet.net


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



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