What would happen if your targetname (arg7) is "A'lar" for example?
A name with one single quote. Could that destroy your variable? Not sure if you filter special characters out before using them. Maybe you could NPCID's instead.
You could try double quotes and/or parse the string "Melee" into a variable in forehand and use the variable instead of the string each time. The guys who posted it should tell you where it happened.
If it works for you all of the time but for some it does not, on special occasions. My suggestion would be to let him post what is parsed into his trackMelee function. So let him post "amount" and "arg7". You could then hardcode these values and test the behaviour. Saving the complete lua file in Unicode (UTF-8) may help if the language used is out of order.
Code:
print("amount: "..amount.." / arg7: "..arg7)
The only difference I see from trackMelee to trackSpell is that you are using SingleQuoted strings as a reference. So it should have sth to do with that.