Hey,
I don't know how the events in question work, but I can't see any errors.
When things aren't working and you can't figure out why, the easiest thing to do is to print stuff to see how far the code progresses and where it goes wrong. For example, you could print(lootLength) just after you define it, too see both if the events fires at all, and if so, whether lootLength is greater than 0.
A couple of other things. You'll probably want to make the lootIt function local, as well you don't have to give your frame a name. In this case you probably shouldn't.
__________________
Grab your sword and fight the Horde!
|