Jump to content
  • 0

BUILDIN_FUNC(downrefitem) Script


Question

Posted (edited)

Hi

Currently I am using 16084 revision. I am not upgrading my current version because its quite stable in our end. Players enjoy playing smoothly. Now I merged BUILDIN_FUNC(downrefitem) to my current svn but it says "equip" is undeclared. If anyone have an idea what part did I missed.

Here is the code I manually put in.

../src/map/script.c


BUILDIN_DEF(downrefitem,"i"),


/*==========================================
* Downgrades an Equipment Part by -1 . [Masao]
*------------------------------------------*/
BUILDIN_FUNC(downrefitem)
{
int i = -1,num,ep;
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) {
 ep = sd->status.inventory[i].equip;
 //Logs items, got from (N)PC scripts [Lupus]
 log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);
 sd->status.inventory[i].refine++;
 pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
 clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2);
 clif_delitem(sd,i,1,3);
 //Logs items, got from (N)PC scripts [Lupus]
 log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);
 clif_additem(sd,i,1,0);
 pc_equipitem(sd,i,ep);
 clif_misceffect(&sd->bl,2);
}
return 0;
}

I just want to know what part is missing.

Edited by AnnieRuru
Please use [CODEBOX] for long contents.

6 answers to this question

Recommended Posts

Posted

i dont think it's source problem...

r16126 this is the only changeset i found that related with downrefitem() command

i think it's your script problem....

if you are lookiing supports for your script...show your script.....

Posted (edited)

Sorry for not giving the exact details of errors. During compilation the error says

script.c: In function ‘buildin_downrefitem’:
script.c:4095:24: error: ‘equip’ undeclared (first use in this function)
script.c:4095:24: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [obj_sql/script.o] Error 1
make[1]: Leaving directory `/home/$USER/Ragnarok/SERVERS/16084_trunk/src/map'
make: *** [map_sql] Error 2

I dont want to upgrade to the latest one. I am happy with the current version. None of our players complaining about the current setup.

Edited by AnnieRuru
move to source modification support, as this is a src modification

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...