Re: Disarm problems...

From: Lincoln Chan (linc@CSUA.Berkeley.EDU)
Date: 08/09/95


Herumm....I thought it was MIGHTY weird that 2 people would make the same
sign mistake, so I started digging through my mail for the original message
and it seems that I've been commenting on the wrong sign!  I don't know
WHERE the hell that sign error came from, since I've been cutting and pasting
any code I get...BUT, here's what I have as the original message from ziz:

---

Here is my code:

   percent = number(1, 101); /* 101% is a complete failure */
   prob = GET_SKILL(ch, SKILL_DISARM);

   if (percent < prob) {
      act ("You failed to disarm $s.", FALSE, ch, 0, victim, TO_CHAR);
   } else {
   disarm(ch, victim);
   }
}

Advice? Thanks.

--Ziz, NetShamen

Sooo, if 1 to 101 is < 0, fail...never will happen, never will fail.

Sorry, Paul did have it right, you got your sign backwards, ziz.

My apologies for the confusion,
linc aka Aladdin of Eternity DikuMUD



This archive was generated by hypermail 2b30 : 12/18/00 PST