Jump to content
  • 0

extending vending shop error


Question

Posted

please help here is the error:

d:\rathena-master\src\map\skill.c(7303): warning C4013: 'clif_vend' undefined; assuming extern returning int

here is the skill.c

case MC_VENDING:
		if(sd)
		{	//Prevent vending of GMs with unnecessary Level to trade/drop. [Skotlex]
			if ( !pc_can_give_items(sd) )
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
			else {
				if (battle_config.extended_vending) {
					struct item_data *item;
					char output[1024];
					int c = 0, i, d = 0;
					sd->vend_lvl = skill_lv;
					if (battle_config.item_zeny)
						d++;
					if (battle_config.item_cash)
						d++;
					for (c = d, i = 0; i < ARRAYLENGTH(item_vend); i++) {
						if ((item = itemdb_exists(item_vend[i].itemid)) != NULL &&
							item->nameid != ITEMID_ZENY && item->nameid != ITEMID_CASH)
							c++;
					}

					if (c > 1)
						clif_vend(sd, sd->vend_lvl);
					else {
						sd->state.prevend = 1;
						if (c) {
							item = itemdb_exists(battle_config.item_zeny ? battle_config.item_zeny : battle_config.item_cash ? battle_config.item_cash : item_vend[0].itemid);
							sd->vend_loot = item->nameid;
							sprintf(output, msg_txt(sd, 1596), itemdb_jname(sd->vend_loot));
							clif_colormes(sd->fd, color_table[COLOR_CYAN], output);
							clif_openvendingreq(sd, 2 + sd->vend_lvl);
						}
						else {
							sd->vend_loot = 0;
							clif_openvendingreq(sd, 2 + sd->vend_lvl);
						}
					}
				}
				else {
					sd->vend_loot = 0;
					sd->state.prevend = 1;
					clif_openvendingreq(sd, 2 + skill_lv);
				}
			}
		}
		break;

Line 7303: clif_vend(sd, sd->vend_lvl);

3 answers to this question

Recommended Posts

  • 0
Posted

it's telling you that the function `clif_vend()` is has unknown return type and it is assumed to be an int,
since you're not using the `clif_vend()` returns, its fine as it is.


you should be able to compile.

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