miyakee Posted June 4, 2012 Posted June 4, 2012 I have this error when im going to recompile the server (Make SQL) I edit the script.c, added this function BUILDIN_FUNC(failedrefitemR) // by jakeRed { int i=-1,num; TBL_PC *sd; num=script_getnum(st,2); sd = script_rid2sd(st); if( sd == NULL ) return 0; if (num > 0 && num <= ARRAYLENGTH(equip)) i=pc_checkequip(sd,equip[num-1]); if(i >= 0) { //Logs items, got from (N)PC scripts [Lupus] if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory.nameid, -1, &sd->status.inventory); sd->status.inventory.refine = sd->status.inventory.refine - 3; pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below clif_refine(sd->fd,0,i,sd->status.inventory.refine); clif_delitem(sd,i,1,2); if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory); clif_additem(sd,i,1,0); clif_misceffect(&sd->bl,2); } return 0; } Btw, im using Rathena server. Hope you could help me.. > r/include -c -o obj_sql/script.o script.c > script.c: In function âbuildin_failedrefitemRâ > :script.c:7045: error: incompatible type for argument 2 of âlog_pick_pc > âscript.c:7045: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast > script.c:7045: error: too many arguments to function âlog_pick_pc > âscript.c:7054: error: incompatible type for argument 2 of âlog_pick_pc > âscript.c:7054: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast > script.c:7054: error: too many arguments to function âlog_pick_pc Quote
EvilPuncker Posted June 4, 2012 Posted June 4, 2012 lazy way, just delete those lines: if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory); you will not use picklogs anyway xd Quote
clydelion Posted June 4, 2012 Posted June 4, 2012 (edited) The modification you're trying to apply is probably not compatible with the revision you're using. lazy way, just delete those lines: if(log_config.enable_logs&0x40) log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory); you will not use picklogs anyway xd +1 Edited June 4, 2012 by clydelion Quote
QQfoolsorellina Posted June 4, 2012 Posted June 4, 2012 I remember similar topic http://rathena.org/board/topic/61991-compiling-error-source/ answered by Lighta Quote
Question
miyakee
I have this error when im going to recompile the server (Make SQL)
I edit the script.c, added this function
BUILDIN_FUNC(failedrefitemR) // by jakeRed
{
int i=-1,num;
TBL_PC *sd;
num=script_getnum(st,2);
sd = script_rid2sd(st);
if( sd == NULL )
return 0;
if (num > 0 && num <= ARRAYLENGTH(equip))
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
log_pick_pc(sd, "N", sd->status.inventory.nameid, -1, &sd->status.inventory);
sd->status.inventory.refine = sd->status.inventory.refine - 3;
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
clif_refine(sd->fd,0,i,sd->status.inventory.refine);
clif_delitem(sd,i,1,2);
if(log_config.enable_logs&0x40)
log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory);
clif_additem(sd,i,1,0);
clif_misceffect(&sd->bl,2);
}
return 0;
}
Btw, im using Rathena server. Hope you could help me..
> r/include -c -o obj_sql/script.o script.c
> script.c: In function âbuildin_failedrefitemRâ
> :script.c:7045: error: incompatible type for argument 2 of âlog_pick_pc
> âscript.c:7045: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast
> script.c:7045: error: too many arguments to function âlog_pick_pc
> âscript.c:7054: error: incompatible type for argument 2 of âlog_pick_pc
> âscript.c:7054: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast
> script.c:7054: error: too many arguments to function âlog_pick_pc
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.