Topic: How to create command /history <ID> = /w Bot !history <ID>
How to create command /history <ID> = /w bot !history <ID> ?
this is my code but error:
static int _handle_history_command(t_connection * c, char const *text)
{
unsigned int i;
t_connection * user;
t_game * game;
for (i=0; text[i]!=' ' && text[i]!='\0'; i++); /* skip command */
for (; text[i]==' '; i++);
if (text[0]=='*')
text++;
if (text[0]=='\0')
{
message_send_text(c,message_type_info,c,"usage: /history <username>");
return 0;
}
{
if ((user = connlist_find_connection_by_accountname("BOT")))
do_whisper(c,"BOT","!history %.128s",&text[i]);
else
snprintf(msgtemp, sizeof(msgtemp), "");
message_send_text(c,message_type_info,c,msgtemp);
return 0;
}
return 0;
}
error:
2>..\..\..\source\src\bnetd\command.cpp(723): error C2660: 'pvpgn::bnetd::do_whisper' : function does not take 4 arguments
2>..\..\..\source\src\bnetd\command.cpp(1306): warning C4146: unary minus operator applied to unsigned type, result still unsigned
please help me HarpyWar