Jump to content
  • 0

Compile Clif.o Error


rogerzor

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/25/15
  • Last Seen:  

 

Some one can help me with this  16102:6: error? Thanxs

 

clif.c:16102:3: error: too few arguments to function ‘clif_cashshop_ack’
   clif_cashshop_ack(sd,npc_cashshop_buy(sd, nameid, amount, points));
 

clif.c:16026:6: note: expected ‘struct npc_data *’ but argument is of type ‘int’
 void clif_cashshop_ack(struct map_session_data* sd, struct npc_data* nd, int error)
      ^
clif.c:16102:3: error: too few arguments to function ‘clif_cashshop_ack’
   clif_cashshop_ack(sd,npc_cashshop_buy(sd, nameid, amount, points));
   ^
clif.c:16026:6: note: declared here
 void clif_cashshop_ack(struct map_session_data* sd, struct npc_data* nd, int error)
      ^
make[1]: *** [obj_sql/clif.o] Error 1
make[1]: Leaving directory `/

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  898
  • Reputation:   118
  • Joined:  05/23/12
  • Last Seen:  

Backup your clif.c and try to replace the function "void clif_cashshop_ack(struct map_session_data* sd, struct npc_data* nd, int error) "

with:

void clif_cashshop_ack(struct map_session_data* sd, int error)
{
	int fd, cost[2] = { 0, 0 };
	struct npc_data *nd;

	nullpo_retv(sd);

	fd = sd->fd;
	nd = map_id2nd(sd->npc_shopid);

	npc_shop_currency_type(sd, nd, cost, false);

	WFIFOHEAD(fd, packet_len(0x289));
	WFIFOW(fd,0) = 0x289;
	WFIFOL(fd,2) = cost[0];
#if PACKETVER < 20070711
	WFIFOW(fd,6) = TOW(error);
#else
	WFIFOL(fd,6) = cost[1];
	WFIFOW(fd,10) = TOW(error);
#endif
	WFIFOSET(fd, packet_len(0x289));
}

 

The function have now only 2 arguments.

 

Rynbef~

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/25/15
  • Last Seen:  

5 minutes ago, Rynbef said:

Backup your clif.c and try to replace the function "void clif_cashshop_ack(struct map_session_data* sd, struct npc_data* nd, int error) "

with:


void clif_cashshop_ack(struct map_session_data* sd, int error)
{
	int fd, cost[2] = { 0, 0 };
	struct npc_data *nd;

	nullpo_retv(sd);

	fd = sd->fd;
	nd = map_id2nd(sd->npc_shopid);

	npc_shop_currency_type(sd, nd, cost, false);

	WFIFOHEAD(fd, packet_len(0x289));
	WFIFOW(fd,0) = 0x289;
	WFIFOL(fd,2) = cost[0];
#if PACKETVER < 20070711
	WFIFOW(fd,6) = TOW(error);
#else
	WFIFOL(fd,6) = cost[1];
	WFIFOW(fd,10) = TOW(error);
#endif
	WFIFOSET(fd, packet_len(0x289));
}

 

The function have now only 2 arguments.

 

Rynbef~

clif.c: In function ‘packetdb_readdb’:
clif.c:19192:5: error: ‘clif_parse_cashshop_buy’ undeclared (first use in this function)
   { clif_parse_cashshop_buy, "cashshopbuy" },
     ^
clif.c:19192:5: note: each undeclared identifier is reported only once for each function it appears in

 

Now he is reporting that. :(

@edit: My bad, I forgot saving the file. But now is correct.

Edited by rogerzor
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  898
  • Reputation:   118
  • Joined:  05/23/12
  • Last Seen:  

Please paste your clif.c at http://pastebin.com/ otherwise I cant resolve your problem.

Edited by Rynbef
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...