Code question re: AFK

From: Richard deJong (winter@HOME.COM)
Date: 08/30/98


This probably has an incredibly easy answer, and I am just a dunce, but
here's my problem.
I am running bpl14, OLC+2.0, and very few other mods as of yet.  I am adding
(at least trying to) a (AFK) setting.  Now, it works fine, but I am getting
the following warning in act.comm.c:

Warning 'vict' might be used uninitialized in this function (refering to
do_tell)

It compiled just fine, pre-change, when the code looked like this:

else if (is_tell_ok(ch, vict))
perform_tell(ch, vict, buf2);

Now it looks like this:

else if (is_tell_ok(ch, vict))
        if (PRF_FLAGGED(vict, PRF_AFK)) {
        sprintf(buf, %s is AFK.\r\n, GET_NAME(vict));
        send_to_char(buf, ch);
        sprintf(buf, "Message: %s\r\n", GET_AFK(vict));
        send_to_char(buf, ch);
        }
perform_tell(ch, vict, buf2);

For a variety of reasons, this was hand written, not copy/pasted, so it may
contain typos, but I don't think it does.  Anything stand out as wrong?

Thanx for any help, Rick


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