View Single Post
04-06-13, 05:09 AM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Function questions

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?
  Reply With Quote