if( new_pfile_version )
load_new_stat();
if( new_pfile_version )
load_new_stat();
fprintf (fp, "Attr %d %d %d %d %d %d\n",
ch->perm_stat[STAT_STR],
ch->perm_stat[STAT_INT],
ch->perm_stat[STAT_WIS],
ch->perm_stat[STAT_DEX],
ch->perm_stat[STAT_CON],
ch->perm_stat[STAT_CHR]); //CHR
fprintf (fp, "AMod %d %d %d %d %d %d\n",
ch->mod_stat[STAT_STR],
ch->mod_stat[STAT_INT],
ch->mod_stat[STAT_WIS],
ch->mod_stat[STAT_DEX],
ch->mod_stat[STAT_CON],
ch->mod_stat[STAT_CHR]); //CHR
fprintf (fp, "Attr %d %d %d %d %d %d\n",
ch->perm_stat[STAT_STR],
ch->perm_stat[STAT_INT],
ch->perm_stat[STAT_WIS],
ch->perm_stat[STAT_DEX],
ch->perm_stat[STAT_CON], ch->perm_stat[STAT_CHR]); //CHR
fprintf (fp, "AMod %d %d %d %d %d %d\n",
ch->mod_stat[STAT_STR],
ch->mod_stat[STAT_INT],
ch->mod_stat[STAT_WIS],
ch->mod_stat[STAT_DEX],
ch->mod_stat[STAT_CON], ch->mod_stat[STAT_CHR]); //CHR
if ( !str_cmp( word, "AttrMod" ) || !str_cmp(word,"AMod"))
{
int stat;
for (stat = 0; stat < MAX_STATS; stat ++)
ch->mod_stat[stat] = fread_number(fp);
fMatch = TRUE;
break;
}
if ( !str_cmp( word, "AttrMod" ) || !str_cmp(word,"AMod"))
{
int stat;
if(ch->version <= 3) {
for (stat = 0; stat < 5; stat ++)
ch->mod_stat[stat] = fread_number(fp);
} else {
for (stat = 0; stat < MAX_STATS; stat ++)
ch->mod_stat[stat] = fread_number(fp);
}
fMatch = TRUE;
break;
}
fprintf( fp, "Vers %d\n", 3 );
struct mob_index_data
{
sh_int ethos = 0;
etc
etc
}
I did a file search for STAT_CON and APPLY_CON etc and found where I had to put things.. I was relatively happy about how well it was going.. and it compiled without errors..
BUT.. when I log onto the mud..
- It asks me "Do you want ANSI? (Y/n)" and I type "Y"… that's fine..
- Then is asks "By what name are you known?" and I type "Bob"… And the mud crashes..
I was running it in GDB using Cygwin.. this is the output I get upon entering "bob"–>
Mon Jun 15 13:23:30 2009 :: [*****] BUG: Fread_char: no match.
Mon Jun 15 13:23:30 2009 :: [*****] BUG: 3
Mon Jun 15 13:23:30 2009 :: [*****] BUG: Fread_char: no match.
Mon Jun 15 13:23:30 2009 :: [*****] BUG: 2047
Program received signal SIGSEGV, Segmentation fault.
skill_lookup (name=0x64 <Address 0x64 out of bounds>) at magic.c:70
70 if (LOWER (name[0]) == LOWER (skill_table[sn].name[0])
(gdb)
I have no idea why it is saying magic.c line 70.. never editted anything in magic.c… this the the segment of code anyhow:
Any ideas? Just yell out if you need to see more code..