Hi, I am trying to make a bounty command, which places a bounty on a players head. Now, the problem i have, is when i compile, i get this error: unterminated character constant. i am pretty sure this has to do with the long amount but im not sure how to fix it. if someone can please point me in the right direction, it would be much appreciated :) i have a dreadful feeling its something really stupid, but i cant work it out... Nic Suzor -=-=-=-=-=-=-THE CODE-=-=-=-=-=- 1240 ACMD(do_bounty) 1241 { 1242 struct char_data *vict; 1243 long amount; 1244 1245 amount = 0; 1246 1247 two_arguments(argument, buf, buf2); 1248 1249 if (!*buf || !*buf2 || !isdigit(*buf2)) { 1250 send_to_char("Usage: bounty <player> <amount>\r\n", ch); 1251 return; 1252 } else if (!(vict = get_char_world_vis(ch, buf))) { 1253 send_to_char("Change Whose bounty?\r\n", ch); 1254 return; 1255 } else if (!CAN_MURDER(ch, vict)) { 1256 send_to_char("The thought of doing that revolts you!\r\n, ch); 1257 return; 1258 } else if ((amount = atoi(buf2)) < 1) { 1259 send_to_char("Bounty must be a positive number!\r\n, ch); 1260 return; 1261 } else if (GET_LEVEL(vict) >= LVL_GOD) { 1262 send_to_char("Yeah, right...\r\n, ch); 1263 return; 1264 } else { 1265 if (PLR_FLAGGED(vict, PLR_BOUNTY)) { 1266 GET_BOUNTY(vict) += amount; 1267 sprintf(buf, "You increase %s's bounty by %d.\r\n", GET_NAME(vict), amount); 1268 send_to_char(buf, ch); 1269 sprintf(buf, "%s has increased your bounty by %d.\r\n", GET_NAME(ch), amount); 1270 send_to_char(buf, vict); 1271 } else { 1272 sprintf(buf, "You place a %d coin bounty on %s.\r\n", amount, GET_NAME(vict)); 1273 send_to_char(buf, ch); 1274 sprintf(buf, "A %d coin bounty has been placed on you by %s.\r\n", amount, GET_NAME(ch)); 1275 send_to_char(buf, vict); 1276 GET_BOUNTY(vict) = amount; 1277 SET_BIT(PLR_FLAGS(vict), PLR_BOUNTY); 1278 } 1279 } 1280 } -=-=-=-=-=-=-THE ERRORS=-=-=-=-=-=-=- make ../bin/circle make[1]: Entering directory `/home/system/mudroot/circlebpl11/src' cc -c -g -O -Wall -fno-strict-prototypes act.other.c act.other.c:1267: unterminated character constant make[1]: *** [act.other.o] Error 1 make[1]: Leaving directory `/home/system/mudroot/circlebpl11/src' make: *** [default] Error 2 =-=-=-=-=-=-=-=THE END=-=-=-=-=-=-=-=- +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST