> >> > Ok, I added a new class and gave the skill kick to the class. I went into > >> > the act.offensive.c and changed the ACMD(do_kick) to: > >> > > >> > 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) > >> > ; > >> > return; > >> > } > >> > > >> > Which should let people in the class BARD perform the skill. But it's > >> > still returning that message. Any clue what I missed? > >> > > >> > -Mike > > Okay, if you look at this code here you'll notice that we're doing a != check > instead of an == check so we've got this: > > if not warrior and not bard do - > > so if we're testing a warrior we get > not warrior = false > not bard = true > true and false is false so it skips the send_to_char and performs the kick. > > if we're testing a cleric we get > net warrior = true > not bard = true that's what he WOULD have if he changed his || to a &&, as the first reply suggested... as it is now, he has if (not warrior) OR (not bard) prevent kicking so a warrior would get not warrior = false not bard = true true or false is true, so it prevents kicking (same thing happens with bard) and any other class not warrior = true not bard = true true or true is true, so it won't let the char kick basically, since no character can be both a warrior and a bard, the code with two != and one || is going to let nobody kick at all.... the || should be an && Peace (ar| Check out Eudaemonia MUD at 207.40.85.11 4000 Still in alpha testing... and we're looking for anyone who wants to help out! thanx +-----------------------------------------------------------+ | 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