Bug - Fixed  has no matches

slyz

Developer
Clarity isn't a quality of mine.

Items in the parameter list can be skipped by MallSellCommand for several reasons:
  • ItemFinder.getFirstMatchingItem() returns null because it didn't understand the item name. Before returning null, it prints an error message: "[noitemfound] has no matches".
  • ItemFinder.getFirstMatchingItem() also returns null for input such as "* warm subject" when you don't have any in your inventory. In this case, no message is shown.
  • ItemFinder.getFirstMatchingItem() returned an AdventureResult, but the item is skipped if you don't have any in your inventory. Again, no message is shown.
In all these cases, MallSellCommand simply ignores the parameter and goes on to process the next one. If there isn't any item in the final list, no AutoMallRequest is made.

I removed the updateDisplay( KoLConstants.ERROR_STATE, message ), so the command is always successful, even if no action was taken. I think the user should have some indication that an item is skipped, and why. Or maybe Mafia should enter an ERROR_STATE and stop instead of processing the rest of the input.
 
Last edited:
Top