Re: Source for Scoreboard

From: Aaron Throckmorton (throck@nfinity.com)
Date: 03/03/99


It doesn't seem like these if statements ever evaluate to true.  buf
never equals "paintball" or "lasertag"  Maybe find another way to
compare them, although I have no idea how right now (brain dead).  Every
thing else looks okay except your sprintf statements.  The way you have
them right now will work, but not on all systems.

Try sprintf(scorebuf + strlen(scorebuf), "%15s Individual %d",
GET_NAME(BLAH...
instead.  It is a little safer too.

Back to the if statements, try setting a breakpoint at this line and
checking the value of buf (course, I'm a windows weenie with MSVC++ :)

Aaron Throckmorton

>  if (str_cmp("paintball", buf)) {
>    if (PRF_FLAGGED(d->character, PRF_PAINTBALL))
>      sprintf(scorebuf,"%s %15s Individual %d      None"
>      ,scorebuf,GET_NAME(d->character),GET_SCORE(d->character));
>      }
>
>   else if (str_cmp("lasertag", buf)) {
>    if (PRF_FLAGGED(d->character, PRF_LASERTAG))
>      sprintf(scorebuf,"%s %15s Individual %d      None"
>      ,scorebuf,GET_NAME(d->character),GET_SCORE(d->character));
>      }
> }
>
>   send_to_char(scorebuf, ch);
> }


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST