I'm writing an item handling script, and I've run into a problem I have been running into for awhile now.
When I try to mallsell multiple items from the cli, sometimes it works, and sometimes it doesn't. When I try mallselling, it's usually in this format:
Sometimes this works well. Sometimes I get this error saying, "[*] has no matches", and I can only sell the items like this:
I know I have at least 1 of every item, but this pops up every now and then.
In the current item handling script I'm working on (for the knob goblin kitchens), it makes this error consistently:
The script works fine up until it tries to mallsell. It can tell how many Spices I have, make the right number of Pestoblades. It then mallsells all of my Knob Mushrooms, Knob Sausage, and Dry Noodles. But for some reason, it won't mallsell Pestoblades unless I put it on a separate line, or use a semicolon instead of a comma.
Any idea why it works for some items and not others?
When I try to mallsell multiple items from the cli, sometimes it works, and sometimes it doesn't. When I try mallselling, it's usually in this format:
Code:
mallsell * item a, * item b, * etc
Sometimes this works well. Sometimes I get this error saying, "[*] has no matches", and I can only sell the items like this:
Code:
mallsell * item a; mallsell * item b; mallsell * etc
I know I have at least 1 of every item, but this pops up every now and then.
In the current item handling script I'm working on (for the knob goblin kitchens), it makes this error consistently:
Code:
void main ()
{
if (item_amount ( $item[spices] ) > 0)
{
cli_execute ("acquire " +item_amount($item[spices]) + " starchy sword");
cli_execute ("make " +item_amount($item[spices]) + " pestoblade");
}
cli_execute ("mallsell * Knob mushroom, * Knob sausage, * dry noodles, * pestoblade");
cli_execute ("autosell * Knob Goblin spatula, * tomato, * wad of dough");
}
The script works fine up until it tries to mallsell. It can tell how many Spices I have, make the right number of Pestoblades. It then mallsells all of my Knob Mushrooms, Knob Sausage, and Dry Noodles. But for some reason, it won't mallsell Pestoblades unless I put it on a separate line, or use a semicolon instead of a comma.
Any idea why it works for some items and not others?