PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
FindSubstance bug when reserve = 1 ?

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096
Display posts from previous:   

Author Message
CWO



Joined: 04 Feb 2006
Posts: 691
Location: Chicago, IL USA

PostPosted: Sun May 14, 2006 12:22 pm    Post subject: FindSubstance bug when reserve = 1 ? Reply with quote

When you use FindSubstance and set the reserve to 1, it doesnt allow you to use SubtractAmount or ConsumeSubstance on an item thats reserved. Also, if you use FindSubstance on an item thats already been reserved by FindSubstance, it will return an error that it didnt find anything (dont know if maybe that last problem was intentional or not). A snippet of the code I'm using is below...

Code:
 
  var material := FindSubstance(who.backpack, thematerial, amt, 1);
  SendSysMessage(who, CStr(material));
  if ( !material )
    SendSysMessage(who, "You dont have enough resources to fix that item.");
    return;
  endif
  if (!ConsumeSubstance(who.backpack, thematerial, amt))
    SendSysMessage(who, "Unable to consume the resources to fix that item.");
    return;
  endif


First, this gives the sysmessage "Unable to consume the resources to fix that item" (Because SubtractAmount/ConsumeSubstance fails)

next time through, it will say "Error: Not enough of that substance in container." and "You dont have enough resources to fix that item."

Now if I do this

Code:

  var material := FindSubstance(who.backpack, thematerial, amt, 0);
  ReserveItem(material);

ConsumeSubstance will work and FindSubstance will continue returning it even if reserved but SubtractAmount still doesnt work.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty