put_shop(price.to_int(), lim.to_int(), item_amount(it) - target), it);
should this line be (missing open bracket before item_amount)-
put_shop(price.to_int(), lim.to_int(), (item_amount(it) - target), it); ?
(using this in my logout script to pull anything that is in my display case from my...