Jump to content
  • 0

failedrefitemR error on recompiling


miyakee

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

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 by clydelion
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

Whoa thanks, i'll try it later. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

I remember similar topic

http://rathena.org/board/topic/61991-compiling-error-source/

answered by Lighta

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

Solved it! Thanks EvilPuncker! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...