Re: [CODE] Adding Jake Turners Second Hand Shop code to Del 's bpl18 Bundle

From: Carlos Myers (
Date: 06/27/01

> Hi peeps,
> Got Cygwin compiling the bundle ok, but I'm wanting to add Jake's Second
> Hand Shop code, has anyone managed to do this in a bpl18 system?
> I'm currently getting the following errors on compile (relevant lines of
> code included):

> line 151: warning: passing arg 3 of 'get_obj_in_list_vis' from
> pointer type
> if(!(obj = get_obj_in_list_vis(customer, arg, customer->carrying)))
> line 151: too few arguments to function 'get_obj_in_list_vis'
> if(!(obj = get_obj_in_list_vis(customer, arg, customer->carrying)))

Check the archives for this one.  We just when over this within the past two
weeks, maybe less

> line 81 warning: int format, long_int arg (arg 5)
> sprintf(buf, "%-4d%-50s%-20d%s\r\n", ++number,
> obj_proto[rnum].short_description, item.sell_price,item.seller_name);
> line 290: warning: int format, long int arg (arg 3)
> sprintf(buf, "A man runs in and informs you that $N has bought $p for %d
> coins.\r\n", item.sell_price);
> line 291: warning: int format, long int arg (arg 3)
> sprintf(buf + strlen(buf), "He also says you received %d gold from the
> which has been deposited in your bank account.", ((item.sell_price / 10) *
> 9));

Is item.sell_price a long int?  If so, then there are two ways to fix this.
One is to change all of the %d to %ld where you use item.sell_price. The
easier way is to change item.sell_price from a long int to an int.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST