<snip of problem description>
>
> Wondering why it would work perfectly for one occurance, and
> then fail on the second? or rather or read the first value than
> exit.
<snip of working code>
<snip of good part of not working code>
> if(skill_name(((int)demp->spell_number)) == skill_name(i))
> send_to_char("Already assigned!\r\n", d->character);
> break;
> }
This would have to be :
if(skill_name(((int)demp->spell_number)) == skill_name(i)) {
send_to_char("Already assigned!\r\n", d->character);
break;
}
}
<snip>
As it is, you're 'break'ing after the first run of the 'for' loop,
regardless if the condition is true.
Welcor
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/05/01 PST