I need help on implementing a inventory system for my game

Almost. Missing an end to wrap up the init function.