On Fri, 28 Aug 1998, Phillip A. Ames wrote:
> On Fri, 28 Aug 1998 17:47:16 -0400 George <greerga@CIRCLEMUD.ORG> writes:
> >You need ()'s there, it's being grouped not the way you want.
>
> Er... Like this?
No.
> It does the exact same as before... Pls send me the
> "new" thing, I'm not quite understanding... It's late, and I just
> finished a load o' homework, having brain trouble.
Think of it this way. They must have a comm badge, AND they must type
either beamup, or beamdown.
> if ((!GET_EQ(ch, WEAR_COMM) && CMD_IS("beamup") || CMD_IS("beamdown"))) {
if (!GET_EQ(ch, WEAR_COMM) && (CMD_IS("beamup") || CMD_IS("beamdown"))) {
Although, if at the top of the function you've already said that they have
to do one of the two commands, this is redundant.
You should structure things like:
<required for any case to execute> (like CMD_IS(...))
<first case>
<required for first case>
<successful first case>
<second case>
<required for second case>
<successful second case>
<end>
-B.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST