[CODE] [Newbie] format arguments, %d vs. %s.

From: Brandon Brown (ViperBrd@aol.com)
Date: 11/14/98


Alright, here's the problem... I generally had the %d below as a %s, but that
would error ( warning: format argument is not a pointer (arg 3) ) , and crash
the mud if anybody ever Look'ed into a room.

In act.informative.c...
  if (AFF_FLAGGED(i, AFF_PAINTBALL)) {
  sprintf(buf2,"...is covered in %d's paintballs!\r\n",GET_PAINTBALL(i));
    send_to_char(buf2, ch);

So I replaced it with a %d, and now I get a number:
Catherine the Grape is standing here.
...is covered in 136's paintballs!

Any idea why this is happening?

Thanks ahead of time,
 - Viper


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