Jump to content
  • 0

pc_delitem


Question

Posted

I have a problem, i get this error.

pc.c:6528: error: too few arguments to function âpc_delitemâ

this is the source edit:

I ve already noticed that there is missing the log_type argument in the edit, but how can i disable this argument, i dont need it or what is the sense of the argument log_type

// Unreal 3 - Juggernaut [ivion]
if( (battle_config.bone_drop == 2) ||
(battle_config.bone_drop==1 && map[sd->bl.m].flag.pvp)
){
if(src && (src->type == BL_PC)) {
struct map_session_data *ssd = (struct map_session_data *)src;
if( (ssd->bl.id != sd->bl.id) &&
(!battle_config.pk_level_range || ((int)ssd->status.base_level <= ((int)sd->status.base_level + battle_config.pk_level_range))) &&
!sd->sc.data[sC_PKDELAY]
) {
struct item item_tmp;
sc_start(&sd->bl,SC_PKDELAY,100,0,60000);
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid=ITEMID_SKULL_;
item_tmp.identify=1;
item_tmp.card[0]=CARD0_CREATE;
item_tmp.card[1]=0;
item_tmp.card[2]=GetWord(sd->status.char_id,0); // CharId
item_tmp.card[3]=GetWord(sd->status.char_id,1);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
for(k = 0; k < MAX_INVENTORY; k++)
if((sd->status.inventory[k].nameid > 0) && (sd->status.inventory[k].amount > 0))
if((sd->status.inventory[k].nameid == ITEMID_SKULL_) && (sd->status.inventory[k].card[2] || sd->status.inventory[k].card[3])) {
while(sd->status.inventory[k].amount >= 5) {
map_addflooritem(&sd->status.inventory[k],5,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
pc_delitem(sd,k,5,0,0);
}
if(sd->status.inventory[k].amount) {
map_addflooritem(&sd->status.inventory[k],sd->status.inventory[k].amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
pc_delitem(sd,k,sd->status.inventory[k].amount,0,0);
}
}
}

3 answers to this question

Recommended Posts

Posted (edited)

i added this now

pc_delitem(sd,k,sd->status.inventory[k].amount,0,0,LOG_TYPE_OTHER);

no error now.

What does the log_type exactly do?

Edited by bimbi

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...