I have a question for all you lua experts.
Here are two functions that do exactly the same thing. They return the name of a person who used interrupted successfully. Both functions have the same body but their headers are different. Many variables are not on same position (example would be "timestamp" in second code is on second place, while in first code its on fourth place).
So how does this work, can you just put variable names wherever or would i get an error if i try to get "time" from one of these two functions.
Code:
function (_, _, token, time, who_serial, who_name, who_flags, _, alvo_serial, alvo_name, alvo_flags, _, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if(token == "SPELL_INTERRUPT") then
name = who_name
return true
end
end
Code:
function(event, timestamp, message, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
if message == "SPELL_INTERRUPT" then
sname = sourceName
return true
end
end
Note, both of the functions work flawlessly for tracking interrupts. I'm just curious why they are so much different.