Jump to content
  • 0

extending vending shop error


Dissidia

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

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);

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

It isn't an error, its just a warning, as benching says, you must be able to compile

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  12/20/11
  • Last Seen:  

did you fix it? I've got same error using the latest git.

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