printf_to_char.txt.txt

snippets · 436 B · 2010-03-30

printf_to_char: a printf-style send_to_char (author unknown, added by Xeno).

Download   « Back to the snippets list

/**************************************************
 * No idea who wrote this...
 * 
 * Xeno
 */

-=comm.c=-
Add this near send_to_char or somewhere close to that..

void printf_to_char (CHAR_DATA *ch, char *fmt, ...)
{
          char buf [MAX_STRING_LENGTH];
          va_list args;
          va_start (args, fmt);
          vsprintf (buf, fmt, args);
          va_end (args);

          send_to_char (buf, ch);

}

Site Stats

Snippets: 1791
Codebases: 571