Hakuryuu 0 Posted September 29, 2015 Command: ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pc_group_exists(3) || !pc_group_exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pc_group_pc_load(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pc_group_pc_load(sd);/* update cache */ return 0; } return 0;} ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pc_group_exists(3) || !pc_group_exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pc_group_pc_load(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pc_group_pc_load(sd);/* update cache */ return 0; } return 0;} Error: atcommand.c: In function ‘atcommand_helper’:atcommand.c:3117: warning: implicit declaration of function ‘pc_group_exists’atcommand.c:3124: warning: implicit declaration of function ‘pc_group_pc_load’atcommand.c:3113: warning: unused variable ‘new_group’ atcommand.c: In function ‘atcommand_helper’:atcommand.c:3117: warning: implicit declaration of function ‘pc_group_exists’atcommand.c:3124: warning: implicit declaration of function ‘pc_group_pc_load’atcommand.c:3113: warning: unused variable ‘new_group’ Please help... Quote Share this post Link to post Share on other sites
0 ossi0110 200 Posted September 30, 2015 try this ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload;/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload;/* update cache */ return 0; } return 0;} ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload;/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload;/* update cache */ return 0; } return 0;} 1 Hakuryuu reacted to this Quote Share this post Link to post Share on other sites
0 ossi0110 200 Posted September 29, 2015 (edited) try this ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload(sd);/* update cache */ return 0; } return 0;} ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload(sd);/* update cache */ return 0; } return 0;} Edited September 29, 2015 by ossi0110 1 Hakuryuu reacted to this Quote Share this post Link to post Share on other sites
0 Hakuryuu 0 Posted September 29, 2015 On 9/29/2015 at 11:29 PM, ossi0110 said: try this ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload(sd);/* update cache */ return 0; } return 0;} ACMD(helper){ int new_group = 0; nullpo_retr(-1, sd); if (!pcg->exists(3) || !pcg->exists(4)) { clif->message(fd, msg_fd(fd,1227)); // Specified group does not exist. return -1; } if ( sd->group_id == 4) { sd->group_id = 3; clif->message(fd,"Mensagens do sistema Helper ativo."); pcg->reload(sd);/* update cache */ return 0; } if ( sd->group_id == 3) { sd->group_id = 4; clif->message(fd,"Mensagens do sistema Helper desativo."); pcg->reload(sd);/* update cache */ return 0; } return 0;} atcommand.c: In function ‘atcommand_helper’:atcommand.c:3123: error: too many arguments to function ‘pcg->reload’atcommand.c:3130: error: too many arguments to function ‘pcg->reload’atcommand.c:3113: warning: unused variable ‘new_group’ atcommand.c: In function ‘atcommand_helper’:atcommand.c:3123: error: too many arguments to function ‘pcg->reload’atcommand.c:3130: error: too many arguments to function ‘pcg->reload’atcommand.c:3113: warning: unused variable ‘new_group’ Quote Share this post Link to post Share on other sites
0 4144 366 Posted September 30, 2015 Probably need use pcg->reload(); and not pcg->reload; 1 Hakuryuu reacted to this Quote Share this post Link to post Share on other sites
0 Hakuryuu 0 Posted October 1, 2015 Thanks Ossi and 4144 ! Quote Share this post Link to post Share on other sites
Command:
Error:
Please help...
Share this post
Link to post
Share on other sites