sell bag bug

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

sell bag bug

Postby SDonald on Wed Apr 28, 2004 1:52 pm

Drocket,
I will post bugs I find although I am not sure you read this forum anymore..

There is a problem with the sell bag command. If you have a stack of items, the stack will sell for the price of one item.


merchant_sell_bag.src
line 104 ff

Code: Select all
if (itemprice)
  if (DestroyItem (item))
    totalsale := totalsale + (itemprice * item.amount);


You are destroying the stack but still expecting to know the .amount
This could read:
Code: Select all
if (itemprice)
      itemamount := item.amount;
      if (DestroyItem (item))
         totalsale := totalsale + (itemprice * itemamount);

For the sake of being complete, also include this at line 98:
Code: Select all
var itemamount;
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia

Postby Drocket on Wed Apr 28, 2004 6:40 pm

Sorry about not replying too often. I tend to have quite a few more pressing things to deal with most of the time :) Anyway, I already fixed this bug. I guess I need up update the WOD files before too much longer, since I've also fixed a pretty good number of other bugs and potential exploits... Probably in the next few days.
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron