George Greer's Exp formula and bpl17 - errors

From: Webremedies (webremedies@idirect.com)
Date: 07/23/00


sorry for the second post,
but to be specific, i replaced the entire exp list switch(chclass), and used the formula defining the double's at the top of level_exp.  I included the same lib files, 
"stdio.h", "stdlib.h", "math.h" because i thought the pow function was contained in one of them, sorry, could be totally wrong on that.  but ohwell. I get these errors when compiling though, 

gcc -g -O2 -Wall    -c -o class.o class.c
class.c:813: parse error before string constant
class.c:813: warning: type defaults to `int' in declaration of `basic_mud_log'
class.c:813: conflicting types for `basic_mud_log'
utils.h:23: previous declaration of `basic_mud_log'
class.c:813: warning: data definition has no type or storage class
make[1]: *** [class.o] Error 1
make[1]: Leaving directory `/home/surgeon/surgeon/circle30bpl17/src'
make: *** [all] Error 2

------ this is what i made the code look like ---
*class.c*
( top of level_exp)
int level_exp(int chclass, int level) 
{
 double mod, powr;
 int surg;


-after:      if (level > LVL_IMMORT) {
     return EXP_MAX - ((LVL_IMPL - level) * 1000);
   }
    
i got the foruma switch.
 switch (chclass) {
  case CLASS_CLERIC:            mod = 22.479; powr = 3.9437; break;
  case CLASS_MAGIC_USER:        mod = 27.672; powr = 3.9055; break;
  case CLASS_THIEF:             mod = 13.332; powr = 3.0685; break;
  case CLASS_WARRIOR:           mod = 26.689; powr = 3.9360; break;
  default: abort();
  }
 surg = (mod * pow(level, powr));
  return surg;
}

i tried using the surg int variable thinking if it was a float, and or double, the int would accept it, and therefor pass it back to basic_mud_log as an int.  wrong though, sorry... for the length. any help would be appreciated.
surgeon


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT