I have code:
Code:
// Cerca materiale
//
if (consume_bottle)
bottle := FindSubstance(who.backpack, UOBJ_EMPTY_BOTTLE, 1, 0);
if (!bottle)
SendSysMessage(who, "You run out of empty bottles.");
break;
endif
endif
// Consuma materiale
//
if (consume_bottle)
if (!SubtractAmount(bottle, 1))
SendSysMessage(who, "Can't consume empty bottles!!");
break;
endif
endif
Why FindSubstance() do not fail while SubtractAmount(bottle, 1) fails?
It say me:
"Can't consume empty bottles!!"