[Code][Newbie][MSVC]Compiling error.

From: anthony benjamin (benjamin@powerweb.net)
Date: 02/03/99


Hi everyone,
I am trying to recompile my mud...I did a total code wipe, and have
started completely over. Now what I am trying to do is change the fight
function perform_violence so that if a character is holding a weapon, he
attacks with that weapon too....when I try to compile I get this error:

C:\circle30bpl14\src\fight.c(932) : error C2143: syntax error : missing
';' before 'type'

Here is my current code:

void perform_violence(void)
{
  struct char_data *ch;

  for (ch = combat_list; ch; ch = next_combat_list) {
    next_combat_list = ch->next_fighting;

    if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room) {
      stop_fighting(ch);
      continue;
    }

    if (IS_NPC(ch)) {
      if (GET_MOB_WAIT(ch) > 0) {
 GET_MOB_WAIT(ch) -= PULSE_VIOLENCE;
 continue;
      }
      GET_MOB_WAIT(ch) = 0;
      if (GET_POS(ch) < POS_FIGHTING) {
 GET_POS(ch) = POS_FIGHTING;
 act("$n scrambles to $s feet!", TRUE, ch, 0, 0, TO_ROOM);
      }
    }

    if (GET_POS(ch) < POS_FIGHTING) {
      send_to_char("You should probably stand up!!\r\n", ch);
    }

    hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
    /* XXX: Need to see if they can handle "" instead of NULL. */
    if (MOB_FLAGGED(ch, MOB_SPEC) && mob_index[GET_MOB_RNUM(ch)].func !=
NULL)
      (mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "")

struct obj_data *holding = GET_EQ(ch, WEAR_HOLD);

   if (holding && GET_OBJ_TYPE(holding) == ITEM_WEAPON)
     {
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
        if (MOB_FLAGGED(ch, MOB_SPEC) &&
            mob_index[GET_MOB_RNUM(ch)].func != NULL)
        (mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "");
     }

  }
}

Now, I know there is probably a simple explanation for this, and I 'm no
C guru so any help would be appreciated.

anthony the male newbie
"Yes I read the FAQ"

P.S.- I am compiling under Microsoft Visual C++ 5.0, and yes I changed
both conf.h and the makefile. It compiles fine until I add my code ; )


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST