void do_spells (CHAR_DATA *ch, char *argument)
{
char output[MSL];
bool found;
char buf[MSL];
SPELL_DATA *psd;
if(IS_NPC(ch))
return;
output[0] = '\0';
found = FALSE;
psd = ch->first_spell;
while(psd!=NULL) {
found = TRUE;
sprintf(buf, "%s: %s %d to %d for %d.\n\r", psd->name,
spell_table[psd->effect_number].name, psd->min_val,
psd->max_val, psd->duration);
strcat(output, buf);
psd = psd->next;
}
if(!found) {
send_to_char("No spells found.\n\r", ch);
return;
}
send_to_char("Spells:\n\r", ch);
send_to_char(output, ch);
}
Spells:
END: fire damage 2 to 10 for 1.
I put some bug()'s in to print it's value at various points and it shows 'fireball' all the way up to where I add my SPELL_DATA to the characters list, but then when I log on with a test char and type spells
it outputs that the name is END(And its not the 'End' in the playerfile because it's not all caps. The playerfile has this line:
And in the load there is:
And that calls spell_to_char in handler which looks like this
And the log those bugs leave is: