I need help in coding

This is a good thread on inventory stuff: