Edit:
After taking a second look: There is one comma too many at the end of your definitions, which will result in an error.
Old Post:
I am guessing that Explosive Shot does not have charges but the buff Lock And Load has stacks, which you would track like this:
Code:
return select(4,UnitBuff("player","Lock and Load")) or 0
Otherwise post the errors you get.
ps.:
Your line
Code:
local charges, _, _, _, = GetSpellCharges("Explosive Shot")
is equal to
Code:
local charges = GetSpellCharges("Explosive Shot")
The "_" is a valid variable name, for which you just decide not to use it after its definition. You can just omit it in your case. The parentheses in your "return" line is also unnecessary. Simplifying you could just write
Code:
return GetSpellCharges("Explosive Shot")