Re: [CODE][NEWBIE] Body parts

From: Rob O'Connor (rene@EDENEAST.COM)
Date: 03/09/98


I just added 5 new classes to my mud...  however the problem is whenever
one of these classes is selected, it will take you to race selection
screen, then after you choose a race you go to the stat rolling screen..
if you decline the stats, it rerolls fine..  but when you try to accept
the stats it crashes without giving a listing of the problem in
syslog.CRASH.  if I choose an existing class(from stock,
mage/warrior/thief/cleric) it will not crash under any circumstance..
I am led to beleive this is the problem:
make ../bin/circle
make[1]: Entering directory `/home/acyd/circle30bpl11/src'
cc -c -g -O -Wall -fno-strict-prototypes  class.c
class.c:378: warning: excess elements in array initializer after `thaco'
cc -o ../bin/circle  comm.o color.o act.comm.o act.informative.o
act.movement.o
act.item.o act.offensive.o act.other.o act.social.o act.wizard.o ban.o
boards.o
castle.o class.o clan.o config.o constants.o db.o fight.o graph.o
handler.o hous
e.o interpreter.o limits.o magic.o mail.o mobact.o modify.o objsave.o
olc.o shop
.o spec_assign.o spec_procs.o spell_parser.o spells.o utils.o weather.o
redit.o
oedit.o zedit.o medit.o sedit.o
make[1]: Leaving directory `/home/acyd/circle30bpl11/src'

the snippet of my thaco charts are as follows:
(line 378 is in the psionocist class)
/* THAC0 for classes and levels.  (To Hit Armor Class 0) */

/* [class], [level] (all) */
const int thaco[NUM_CLASSES][LVL_IMPL + 1] = {

/* MAGE */
  /* 0                   5                  10                  15
   */
  {100, 20, 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15,
15,
  15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9},
  /* 20                  25                  30             */

/* CLERIC */
  /* 0                   5                  10                  15
   */
  {100, 20, 20, 20, 18, 18, 18, 16, 16, 16, 14, 14, 14, 12, 12, 12, 10,
10,
  10, 8, 8, 8, 6, 6, 6, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1},
  /* 20             25             30                               */

/* THIEF */
  /* 0                   5                  10                  15
   */
  {100, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 13, 13, 12,
12,
  11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3},
  /* 20              25             30                              */

/* WARRIOR */
  /* 0                   5                  10              15      */
  {100, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
  2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  /* 20             25             30                               */

/* NECROMANCER */
  /* 0                   5                  10                  15*/
  {100, 20, 20, 19, 19, 19, 18, 18, 18, 18, 17, 17, 17, 17, 17, 16, 16,
16,
  16, 16, 15, 15, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1},
  /* 20                  25                  30             */

/* PALADIN */
  /* 0                   5                  10                  15*/
  {100, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
2,
  2, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1,1, 1},
  /* 20                  25                  30             */

/* ANTI-PALADIN */
  /* 0                   5                  10                  15*/
  {100, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
2,
  2, 2, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1,1, 1},
  /* 20                  25                  30             */

/* MERCENARY */
  /* 0                   5                  10                  15*/
  {100, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
2,
  2, 2, 2, 2, 2, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1,1, 1},

  /* 20                  25                  30             */

/* PSIONOCIST */
  /* 0                   5                  10                  15 */
  {100, 20, 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15,
15,
  15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9}
  /* 20                  25                  30             */

};

the #s jutting out to the right(in the middle column if there is one,
are on the first line.. but my email program wraps them).


Thanks.


-ro

Katan.mudservices.com 6000


     +------------------------------------------------------------+
     | 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