Code question: new skill problem

From: Mud Admin (empire@www.cedarnet.com)
Date: 06/28/96


I am attempting to add a turn undead skill for my clerics and paladins in 
my MUD. I started writing the basic form of the skill, but now when I try 
to compile it...I get an odd error:

act.offensive.c:244: unterminated character constant

Line 244 of the code is not part of the do_turn skill I was working on. 
It is part of the do_order command that is further down the 
act.offensive.c file. Since I did not make any changes to the do_order 
code, I would assume that it is the do_turn that is causing the problem.

Here is my code:

ACMD(do_turn)
{
  struct char_data *vict;
  int turn_level, percent, prob, skill_num;
  
  skill_num = 145;
 
  one_argument(argument, buf);
 
  if (!(vict = get_char_room_vis(ch, buf))) {
    send_to_char("Turn who?\r\n", ch);
    return;
  }
  if (vict == ch) {
    send_to_char("How do you plan to turn yourself?\r\n", ch);
    return;
  }
/*  if (vict != IS_UNDEAD(vict)) {
    send_to_char("You can only attempt to turn undead!\r\n", ch);
    return;
  }
*/
 
  if (GET_CLASS(ch) == CLASS_CLERIC) {
    turn_level = GET_LEVEL(ch);
    } else {
    turn_level = (GET_LEVEL(ch) -2);
    }
 
  percent = number(1, 101);     /* 101% is a complete failure */
  prob = GET_SKILL(ch, SKILL_TURNING);
 
  sprintf(buf, "You scored %d percent, with a %d probibility.\r\n", 
percent, prob);
  sprintf(buf, "You turn at level %d a %d HD undead.\r\n, turn_level, 
GET_LEVEL(vict));
  send_to_char(buf, ch);
 
  if (percent > prob)
    return;
 
  if (percent < 8)
    skill_gain(ch, skill_num);
  return;
}

NOTICE: It is not supposed to do anything yet, if the turn is 
successful...I just want to get the framework in place, and then figure 
out what I want to do about turning, destroying, charming etc undead targets.

Help/advice is appreacited. Flames are not.

--Ziz, NetShamen



This archive was generated by hypermail 2b30 : 12/18/00 PST