I've never worked with Lua but I'm pretty sure that if statements are unnecessary unless you want a condition. Hence all you need to add is the call to Logic.hero_add_item() function (end is part of the if-then-else statement and is used instead of brackets to end a block so you don't need it either).
|