Hook Signature Discrepancy
Posted: Sun Nov 09, 2014 8:49 pm
I have successfully added an 'onAttack' hook to the party component.
The signature for my hook is as follows:
However, the script reference shows the following signature:
I changed my script to use the second signature and the engine accepted it and called it on attacks.
Does anybody know which signature I am supposed to use? In the second one, the one listed in the scripting reference, I can't figure out what is in the action parameter. Calling type(action) returns 'table' but when I try the following:
nothing is printed on the hud.
Any help would be appreciated.
Thanks.
The signature for my hook is as follows:
Code: Select all
onAttack = function(party, champion, weapon)
...
end
Code: Select all
onAttack(self, champion, action, slot)
Does anybody know which signature I am supposed to use? In the second one, the one listed in the scripting reference, I can't figure out what is in the action parameter. Calling type(action) returns 'table' but when I try the following:
Code: Select all
for key,value in pairs(action) do
hudPrint(key, value)
end
Any help would be appreciated.
Thanks.