Using Nick's Telnet Negotiation
http://mushclient.com/forum/bbshowpost.php?id=10043&page=11
Last post of the page.
I've been trying to add group information to send to a plugin that will show the miniwindows like the Group Information sent in the post above.
Here's my code:
And I'm getting this error:
I'm not sure if it's the GroupNum causing the warning or the name trying to be sent.
Did I miss something obvious here?
http://mushclient.com/forum/bbshowpost.php?id=10043&page=11
Last post of the page.
I've been trying to add group information to send to a plugin that will show the miniwindows like the Group Information sent in the post above.
Here's my code:
void
show_group (CHAR_DATA * ch)
{
char buf[MAX_STRING_LENGTH];
CHAR_DATA *gch;
int GroupNum = 0;
if (WANT_TELNET_INFO (ch))
{
for (gch = char_list; gch; gch = gch->next)
{
if (gch->deleted)
continue;
if (is_same_group (gch, ch))
{
GroupNum += 1;
sprintf (buf, sizeof (buf),
"\xFF\xFA\x66"
"tt=\"Tel_Group\";"
"GroupNum=%d;"
"name=%s;"
"hp=%d;"
"maxhp=%d;"
"move=%d;"
"maxmove=%d;",
GroupNum,
capitalize (PERS (gch, ch)),
gch->hit, gch->max_hit,
gch->move, gch->max_move
); <----LINE 1892
//finish telnet negotiation after the combat info
strncpy(&buf [strlen (buf)], "\xFF\xF0", sizeof (buf) - strlen (buf)); // IAC SE
send_to_char( buf, ch );
}
}
return;
}
}
And I'm getting this error:
act_comm.c:1892: warning: passing argument 2 of 'sprintf' makes pointer from integer without a cast
I'm not sure if it's the GroupNum causing the warning or the name trying to be sent.
Did I miss something obvious here?