Inventory custom script

Please at least tell us exactly what the errors are.

Antony.