The problem is, it isnt doing Anything at all. No gaining of silver, or gold. 
the shop keeper doesnt loose or gain welth either. 

"Dale Kingston" <[EMAIL PROTECTED]> wrote:

>Stupid question, but maybe not.... Does it give you gold? Meaning is it
>taking the items and giving you gold, but not displaying that it is. Or is
>it just not doing anything?
>
>----- Original Message ----- 
>From: <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Thursday, October 09, 2003 10:02 PM
>Subject: sell all help
>
>
>> I do not know where i got this code from, as there was no comment file
>with it, but I was wondering if anyone could see anything wrong with this
>chunk of code.
>>
>>     if (!str_cmp(arg, "all"))
>>     {
>>         for (obj = ch->carrying; obj != NULL; obj = obj_next)
>>         {
>>         obj_next = obj->next_content;
>>
>>         if (can_drop_obj(ch, obj)
>>         && obj->wear_loc == WEAR_NONE
>>         && can_see_obj(keeper, obj)
>>         && ((cost = get_cost(keeper, obj, FALSE)) > 0)
>>         && (cost < keeper->gold))
>>         {
>>         tcost += cost;
>>         count++;
>>         ch->gold += cost;
>>         deduct_cost(keeper, cost);
>>
>>         if (keeper->gold < 0)
>>             keeper->gold = 0;
>>
>>         if (obj->item_type == ITEM_TRASH || IS_OBJ_STAT(obj,
>ITEM_SELL_EXTRACT))
>>         {
>>             extract_obj(obj);
>>         }
>>         else
>>         {
>>             obj_from_char(obj);
>>             if (obj->timer)
>>             SET_BIT(obj->extra_flags, ITEM_HAD_TIMER);
>>             else
>>             obj->timer = number_range(50, 100);
>>             obj_to_keeper(obj, keeper);
>>         }
>>
>>         }           // salable item ifcheck
>>
>>     }           // for loop
>>
>>     sprintf(buf, "You sell %d items for %d gold.\r\n", count, tcost);
>>     send_to_char(buf, ch);
>>     return;
>>     }               // 'all' if check
>>
>>
>> When i have 10 diamonds in my inventory and type sell all diamond, it says
>you sell 0 items for 0 gold.  I can not figure out what the problem is.  any
>help would be appreciated
>>
>> Shadow


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Reply via email to