Re: [CODE] Unterminated character constant

From: Mike Schlagenhauf (mschlag@CS.PURDUE.EDU)
Date: 04/06/98


What this means is that you're either missing a pair of quotes, or have an
extra.  In this case, you happen to have an extra pair of quotes.


>  if (GET_HIT(vict) > 0) {
>    send_to_char("This person does not need first aid."\r\n", ch);

^^^^^

        check right there, as that should be your problem.  Also (here's me
being really anal-retentive), on the fail message, it should say "Oops",
instead of "Oppss".  ^_^  Hope that fixes your problem.

Mike Schlagenhauf
mschlag@cs.purdue.edu
ValinorMUD:  valinor.accs.net 4000  (not open to new players yet  ^_^ )


-----Original Message-----
From: Thomas Smith <ibedemigod@HOTMAIL.COM>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Monday, April 06, 1998 11:34 PM
Subject:  [CODE] Unterminated character constant


>Hello again,
>
>At the risk of being a total pain in the ass (which i know i am hehe) I
>whiped up this skill and when i complie it i get an "Unterminated
>character constant" error.  What this code is supposed to do is, if your
>a warrior, you can administer first aid to someone with under 0 hp.  If
>your succesful, you bring you victim up to 1 hp so he/she stops dying.
>
>Thanx in advance.
>
>--snip--
>
>ACMD(do_aid)
>{
>  struct char_data *vict;
>  int percent, prob;
>
>  if (GET_CLASS(ch) != CLASS_WARRIOR) {
>    send_to_char("You have no clue how to administer first aid!\r\n",
>ch);
>    return;
>  }
>
>  if (GET_HIT(vict) > 0) {
>    send_to_char("This person does not need first aid."\r\n", ch);
>    return;
>  }
>
>  one_argument(argument, arg);
>
>    if (!(vict = get_char_room_vis(ch, arg))) {
>      send_to_char("Administer first aid to whom?\r\n", ch);
>      return;
>    }
>
>  if (vict == ch) {
>    send_to_char("You can't adminster first aid to yourself!!\r\n", ch);
>    return;
>  }
>
>  percent = number(1, 101);     /* 101% is a complete failure */
>  prob = GET_SKILL(ch, SKILL_AID);
>
>  if (percent > prob) {
>   send_to_char("Oppss!!\r\n");
>  }
>  else {
>    GET_HIT(vict) = GET_MAX_HIT(vict) - GET_MAX_HIT(vict) + 1;
>    send_to_char("You fell a bit better now.\r\n", vict);
>  }
>}
>
>--snip--
>
>-=DemiGod=-
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>


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