View Single Post
06-22-10, 11:44 AM   #12
b3vad
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 21
my lua error

this is my lua eror
Note: F_K1A is name of my frame
Code:
Message: [string "F_K1A:OnLoad"]:1: attempt to call global 'F_K1A_OnLoad' (a nil value)
Time: 06/22/10 22:08:25
Count: 1
Stack: [string "*:OnLoad"]:1: in function <[string "*:OnLoad"]:1>

Locals: self = F_K1A {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = "attempt to call global 'F_K1A_OnLoad' (a nil value)"
after adding
Code:
function F_K1A_onLoad()
this.RegisterEvent("PLAYER_TARGET_CHANGED"); 
end
function F_K1A_onEvent()
if (event == "PLAYER_TARGET_CHANGED") then
print("Hello " .. UnitName("target") .. "!");
end

end
in my lua file and calling them from xml with
Code:
			<OnLoad>F_K1A_OnLoad();</OnLoad>
			<OnEvent>F_K1A_OnEvent();</OnEvent>
this little problem really eats my nerves

Last edited by b3vad : 06-22-10 at 11:49 AM.
  Reply With Quote