Originally posted by [b]Koca[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2918
Hi, I've been testing some stuff lately and I found that atcommand_param isn't working when used as charcommand.
The problem lies on:
CODE
const char* param[] = { "@str", "@agi", "@vit", "@int", "@dex", "@luk", NULL };
.
.
.
for (i = 0; param[i] != NULL; i++)
if (strcmpi(command, param[i]) == 0)
break;
I suggest two solutions:
1) This is sooo wrooong, but works globally (IMG:
style_emoticons/default/smile.gif)
CODE
*command = '@'; // <- This line is added
if ( (info->func(fd, (*atcmd_msg == atcommand_symbol) ? sd : ssd, command, params) != 0) )
{
sprintf(output,msg_txt(154), command);
clif_displaymessage(fd, output);
}
2) Repair only atcommand_param:
CODE
const char* param[] = { "str", "agi", "vit", "int", "dex", "luk", NULL }; // notice removed '@'s
.
.
.
for (i = 0; param[i] != NULL; i++)
if (strcmpi(command+1, param[i]) == 0) // notice that 'command+1'
break;
Thanks (IMG:
style_emoticons/default/ani_meow.gif)