Jump to content
  • 0

@costumeitem equip issue


Lelouch vi Britannia

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   84
  • Joined:  01/05/12
  • Last Seen:  

After upgrading my trunk into the latest git this error shows up...

script.c: In function ‘buildin_costume’:
script.c:21369: error: ‘equip’ undeclared (first use in this function)
script.c:21369: error: (Each undeclared identifier is reported only once
script.c:21369: error: for each function it appears in.)
make[1]: *** [obj/script.o] Error 1
make[1]: Leaving directory `/root/Desktop/rathena/src/map'
make: *** [map] Error 2

After searching it was on...

if (num > 0 && num <= ARRAYLENGTH(equip))

and this is the whole src

/**
 * Costume item edit
 **/
BUILDIN_FUNC(costume) {
	int i = -1, num, ep;
	TBL_PC *sd;

	num = script_getnum(st, 2); // Equip Slot
	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)
		return 0;

	ep = sd->status.inventory[i].equip;
	if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP))
		return 0;

	log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);
	pc_unequipitem(sd, i, 2);
	clif_delitem(sd, i, 1, 3);
	// --------------------------------------------------------------------
	sd->status.inventory[i].refine = 0;
	sd->status.inventory[i].attribute = 0;
	sd->status.inventory[i].card[0] = CARD0_CREATE;
	sd->status.inventory[i].card[1] = 0;
	sd->status.inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0);
	sd->status.inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1);

	if (ep&EQP_HEAD_TOP) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }
	if (ep&EQP_HEAD_LOW) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }
	if (ep&EQP_HEAD_MID) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }
	// --------------------------------------------------------------------
	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, 3);

	return 0;
}

From: http://pastebin.com/T5Fqeyb1

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

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