Hi all !!!
Here I am again, well, I\'m having some problems with my do_tell... below is the code...
But the problem is that when vict get\'s AFK and someone tries to tell him, the server stops...
I already try to run them in GDB, but Idon\'t recognezed the error...
The server stops in the line: sprintf(buf_tmp, \"%s is AFK and may not hear your tell.\\r\\n\",GET_NAME(vict));
accusing an error in genops.c:429
Welll, if anyone can help me with that I\'ll be grateful...
Tiago
There is the code:
ACMD(do_tell)
{
char *buf_tmp;
struct char_data *vict = NULL;
half_chop(argument, buf, buf2);
buf_tmp = \"/0\";
if (!*buf || !*buf2)
send_to_char(\"Who do you wish to tell what??\\r\\n\", ch);
else if ((vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD)) && (PRF_FLAGGED(vict, PRF_AFK))) {
sprintf(buf_tmp, \"%s is AFK and may not hear your tell.\\r\\n\",GET_NAME(vict));
sprintf(buf_tmp+strlen(buf_tmp), \"MESSAGE: %s\\r\\n\", GET_AFK(vict));
send_to_char(buf_tmp, ch);
}
else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
send_to_char(NOPERSON, ch);
else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD)))
send_to_char(NOPERSON, ch);
else if (is_tell_ok(ch, vict))
perform_tell(ch, vict, buf2);
}
___________________________________________
Sent with eCorrei - http://ecorrei.sf.net/
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/24/03 PDT