10 Nov, 2012, triskaledia wrote in the 1st comment:
Votes: 0
I've been using this code bit for a couple years now and have never had an issue with it until recently.
When I go to checkt wield it bugs out and I was thinking maybe one of my created weapons was bugged/glitched so I added a simple log
so I could check the weapon.
for ( obj = object_list; obj != NULL; obj = obj->next )
{
if(obj->wear_loc == wearloc && (!level || obj->level == level))
{
number++;
sprintf(buf," %d ) [ LEVEL: %3d ] %s (%d)\n\r",number,obj->level,obj->short_descr,obj->pIndexData->vnum);
add_buf(buffer,buf);

sprintf(buf, "Error: Item bugged.! %d", obj->pIndexData->vnum);
do_echo(ch, buf);
log_string(buf);
}
}

It ends up loggings each item as 'bugged'. Is there a better way to try and pinpoint the issue?
I included the website in the topic description so it could be looked over also.
I do not know how to 'step through the code' with gdb debugger mode. Any help appreciated.
10 Nov, 2012, triskaledia wrote in the 2nd comment:
Votes: 0
To add to that, I just realized that I am just logging each item… and not pinpointing the glitched item…
10 Nov, 2012, triskaledia wrote in the 3rd comment:
Votes: 0
The mud doesn't crash when I use a level argument for the wield.
checkt '#' wield properly displays the wield-type objects.
Perhaps it would be simpler to just make it so the checkt requires a level argument?
Or perhaps checkt wield is just overloading the 'storage' before during output?
10 Nov, 2012, arholly wrote in the 4th comment:
Votes: 0
As another newbie coder…

Can you show us the whole function? What is it giving you in GDB when it crashes?

And I can show you how to step through in GDB. Once you learn that (and I only recently did), it makes a big difference.
10 Nov, 2012, triskaledia wrote in the 5th comment:
Votes: 0
When I try to run while in the gdb mode it tells me to use the file command, not sure what that means. Trying to look for a gdb basic instructions online right now.
10 Nov, 2012, arholly wrote in the 6th comment:
Votes: 0
http://www.gammon.com.au/forum/bbshowpos...

Great tutorial on GDP for MUDs.
0.0/6