Re: Shoplift Command Help

From: russ brown (
Date: 12/13/00

Your problem is that you have a loop that you dont want.

The variable 'buynum' keeps track of how many items you buy.
ie buy 5 bread.

Since you only want to to shop lift 1 item you dont need buynum
or the loop anymore.

-----Original Message-----
From: Alex Mann <alex4501@HOTMAIL.COM>

>void shoplift(char *arg, struct char_data * ch, struct char_data * keeper,
>int shop_nr)

<snip part of code >

>  while ((obj) && (IS_CARRYING_N(ch) < CAN_CARRY_N(ch)) && (bought <
>         && (IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj) <= CAN_CARRY_W(ch))) {

Try removing this loop and only run through the code in the body of the loop
since you are not setting buynum anywhere above, it seems this loop is
until your shoplifter cant carry anymore items.

You probably also want to remove all refrences to bought and buynum.

I hope this helps.

Russ Brown

Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 04/11/01 PDT