HyperSecret
2009-07-02 09:16:51
So I was getting bad results with BankContains for yew logs and I knew that they were there. So I took a look at the BankContains function.
My Yew Logs were in the first bank slot [Index := 0]. BankContains is
Should be changed to
Or possibly even
I don't know much about the development with these SmartGetField stuff, so I don't know if the last suggestion would work the way it is suppose to, but Having it be BS.Index > 0 doesn't account for the first bank position.
My Yew Logs were in the first bank slot [Index := 0]. BankContains is
2 : if BS.Index > 0 then
Result := SmartGetFieldInt(ItemObj, BankItemIndex) = BS.Index;
Should be changed to
2 : if BS.Index >= 0 then
Result := SmartGetFieldInt(ItemObj, BankItemIndex) = BS.Index;
Or possibly even
2 : Result := SmartGetFieldInt(ItemObj, BankItemIndex) = BS.Index;
I don't know much about the development with these SmartGetField stuff, so I don't know if the last suggestion would work the way it is suppose to, but Having it be BS.Index > 0 doesn't account for the first bank position.