Can you include the actual GDB output please? include ALL the info that
WHERE shows (as far as the code trace anyway). Thanks!
- Valnir
----- Original Message -----
From: "KJM" <[EMAIL PROTECTED]>
To: "'Valnir'" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Thursday, May 12, 2005 4:04 PM
Subject: RE: Odd problem
Here is the code. It works on my test port. Crashes on the main port. I
have no idea why.
The GDB outpur showa that it crashes on the bool found = FALSE; Odd.
void do_spells(CHAR_DATA *ch, char *argument)
{
char spell_list[LEVEL_IMMORTAL][MAX_STRING_LENGTH];
char spell_columns[LEVEL_IMMORTAL];
int sn,lev,mana;
bool found = FALSE;
char buf[MAX_STRING_LENGTH];
char output[8*MAX_STRING_LENGTH];
if (IS_NPC(ch))
return;
output[0] = '\0';
for (lev = 0; lev < LEVEL_IMMORTAL; lev++)
{
spell_columns[lev] = 0;
spell_list[lev][0] = '\0';
}
for (sn = 0; sn < MAX_SKILL; sn++)
{
if (skill_table[sn].name == NULL )
break;
if(ch->pcdata->learned[sn] >= 1)
{
found = TRUE;
lev=get_skill_level(ch,sn);
if (lev>=LEVEL_IMMORTAL)
continue;
if (ch->level < lev)
sprintf(buf,"@R%-18s N/[EMAIL PROTECTED] ", skill_table[sn].name);
else
{
mana = UMAX(skill_table[sn].min_mana,100/(2 + ch->level - lev));
sprintf(buf,"@g%-18s @wMana: @[EMAIL PROTECTED] @wLearned: @[EMAIL
PROTECTED]
",skill_table[sn].name, mana, ch->pcdata->learned[sn]);
}
if (spell_list[lev][0] == '\0')
sprintf(spell_list[lev],"[EMAIL PROTECTED] @c%2d: %s",lev,buf);
else
{
strcat(spell_list[lev],"\n\r ");
strcat(spell_list[lev],buf);
}
}
}
if (!found)
{
send_to_char("You know no spells.\n\r",ch);
return;
}
for (lev = 0; lev < LEVEL_IMMORTAL; lev++)
if (spell_list[lev][0] != '\0')
strcat(output,spell_list[lev]);
strcat(output,"\n\r");
page_to_char(output,ch);
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Valnir
Sent: Thursday, May 12, 2005 11:07 AM
To: [email protected]
Subject: Re: Odd problem
Well, while I bet a lot of us would love to help you out,
we can't do much with out info.. like what the
function/command is or does. Often times knowing the
function of something will jog ideas much more effectively.
- Valnir
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 11, 2005 7:06 AM
Subject: Odd problem
Greetings,
I have an odd problem that is driving me insane. A
command that works
(with no problems I might add) on my test port. Crashes
on the my main
port. The code bring run is EXACTLY the same code. I
run both ports from
the same executable. Does anyone have ANY clue as to why?
Thanks
-K
--
ROM mailing list
[email protected]
Unsubscribe here ->>>
http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>>
http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom