Re: [CODE] Exp code and formula

From: Davies, Nathan (DaviesN@AECL.CA)
Date: 11/19/97


>
>> >if (GET_LEVEL(ch) >= 50 && GET_LEVEL(ch) < 60)
>> >   mod = 25;
>> >else
>> >   mod = 30;
>>
>> Notice that your 'mod' will always be 25 or 30.
>
>I don't see why.

Because there are like 5 if's, followed by one else.  The else defaults
to the last if, so even if one of the first few if's are true and it
set's mod to say 8.  If the last if isn't true, the else will set it to
30, but if the last if is true, it will set it to 25.  The whole set of
if's should be changed to else ifs and the Get_Level >= should be
chucked...

Ex.

If( Level < 10 )
  mod = 1;
else if( Level < 20 ) /* 10 - 19 */
  mod = 2;

etc...


>Nathan Davies,


     +------------------------------------------------------------+
     | 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/08/00 PST