Hi Mike,
On Wed, 20 Nov 1996, CircleMud Admin wrote:
>
> if (GET_CLASS(ch) != CLASS_WARRIOR || GET_CLASS(ch) != CLASS_BARD) {
> send_to_char("You'd better leave all the martial arts to
> fighters.\r\n", ch)
>
> Which should let people in the class BARD perform the skill. But it's
> still returning that message. Any clue what I missed?
>
Think about this for a second:
You have a Bard.
The check goes as follows:
Set 1:
Q. Is the character not a warrior?
A. Yes, he is a warrior. (True)
Set 2:
Q. Is the character not a bard?
A. No, he IS a bard. (False)
You have:
(Set 1) || (Set 2)
or
(True) || (False)
which equates to TRUE.
Therefore, your if clause executes the code.
Perhaps you meant to use an AND? (&&)
Later!
Mark McArthey ` _ , '
mcarthey@execpc.com - (o)o) -
-----------------------ooO'(_)--Ooo-
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST