On Mon, 3 Jun 1996, Brian Williams wrote:
> if (GET_LEVEL(tch) >= LVL_IMPL) {
> sprintf(buf, "[Implementor] %s %s",
> GET_NAME(tch), GET_TITLE(tch));
> } else {
> num_can_see++;
> sprintf(buf, "%s[%2d %s] %s %s",
> (GET_LEVEL(tch) >= LVL_IMMORT ? CCYEL(ch, C_SPR) : ""),
> GET_LEVEL(tch), CLASS_ABBR(tch), GET_NAME(tch),
> GET_TITLE(tch));
>
> ... yet I can't see myself when I log on.. the test version... it says
> "No-one at all!" when I type who.. any ideas?
That's not terribly surprising. If you'd look at it, you'd see that
num_can_see is incremented after your 'else'. Since num_can_see
determined what is shown at the end of who (eg., "No-one at all!"), this
is your problem.
The solution is, of course, up to you to decide upon because there are
msny, msny availible. At the bare minimum I suggest changing the code to:
if (GET_LEVEL(ch) == LVL_IMPLEMENTOR)
sprintf(buf, "[Implementor] %s %s", GET_NAME(tch), GET_TITLE(tch));
else
sprintf(buf, "[%2d %s] %s %s",
GET_LEVEL(tch), CLASS_ABBR(tch), GET_NAME(tch), GET_TITLE(tch));
num_can_see++;
Place that after the 'else' for the shortlist check (where you placed
your level check).
There is many better ways to doing these things, if you'd like one or
two, just e-mail.
-dak/ShadowLord
trice@dstar.california.com, dkoepke@california.com
This archive was generated by hypermail 2b30 : 12/18/00 PST