As the error says "integer expected, got nil",
so write something like "item:add_amount(1)".
EDIT: when I wrote above:
You can also use the function "item:add_amount(amount)",
which should be equivalent to "item:add_amount(item:get_amount() + 1)".
I wanted to say:
You can also use the function "item:add_amount(amount)",
which should be equivalent to "item:set_amount(item:get_amount() + 1)".
Sorry for the mistakes, it's quite late and we are all tired...
