miyakee Posted June 4, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 25 Reputation: 0 Joined: 05/18/12 Last Seen: November 25, 2015 Share 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 Link to comment Share on other sites More sharing options...
EvilPuncker Posted June 4, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share 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 Link to comment Share on other sites More sharing options...
clydelion Posted June 4, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share 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 Link to comment Share on other sites More sharing options...
miyakee Posted June 4, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 25 Reputation: 0 Joined: 05/18/12 Last Seen: November 25, 2015 Author Share Posted June 4, 2012 Whoa thanks, i'll try it later. Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted June 4, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted June 4, 2012 I remember similar topic http://rathena.org/board/topic/61991-compiling-error-source/ answered by Lighta Quote Link to comment Share on other sites More sharing options...
miyakee Posted June 5, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 25 Reputation: 0 Joined: 05/18/12 Last Seen: November 25, 2015 Author Share Posted June 5, 2012 Solved it! Thanks EvilPuncker! Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.