So i have a function like that:
Code:
function PVPSound_UpdateSoundEffectEngine(self, elapsed)
end
PVPSoundEffectSoundEngineFrame:SetScript("OnUpdate", PVPSound_UpdateSoundEffectEngine)
If i change the function to:
local addon, ns = ...
local PVPSound = { }
ns.PVPSound = PVPSound
Code:
function PVPSound:UpdateSoundEffectEngine(self, elapsed)
end
PVPSoundEffectSoundEngineFrame:SetScript("OnUpdate", PVPSound:UpdateSoundEffectEngine)
Then why cant i make the function local?
Also why cant call the function like that with the SetScript?