[Newbie] [CODE] init_char crash

From: John Woods (JWoodsIII@AOL.COM)
Date: 07/26/98


After my recent runin with the CREATE macro, I decided to completely redo my
character creation in a more world-based system. ie, they created their
characters in rooms by doing certain actions. It only asked for their name and
password, then confirmation of password, then sent them off into the 'mists of
creation'. There they choose sex, race, class, and stats. But in init_char, I
seemed to have hit a problem. It crashes after logging "player_table...". I
get the feeling I'm not supposed to remove that next line, and since I
couldn't figure out exactly what it did, I decided to risk getting flamed.
Here's a section of init_char, with the problem marked with an arrow.

  log("mana, hit, etc");
  ch->points.max_mana = 100;
  ch->points.mana = GET_MAX_MANA(ch);
  ch->points.hit = GET_MAX_HIT(ch);
  ch->points.max_move = 82;
  ch->points.move = GET_MAX_MOVE(ch);
  ch->points.armor = 100;

  log("player_table...");
  player_table[top_of_p_table].id = GET_IDNUM(ch) = ++top_idnum;   <==

  log("skills");
  for (i = 1; i <= MAX_SKILLS; i++) {
    if (GET_LEVEL(ch) < LVL_IMPL)
      SET_SKILL(ch, i, 0);
    else
      SET_SKILL(ch, i, 100);
  }

Thanks everyone!

-Elrelet


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