Originally Posted by unLeashed3k
Lua Code:
YYZ = {} YYZ.ModName = "ESOunLeashed" function YYZ.doIt() local str = ZO_CompassContainer d(string.format("%s", str)) end function YYZ.OnAddOnLoaded(event, str) if str == YYZ.ModName then EVENT_MANAGER:RegisterForUpdate(YYZ.ModName, 1000, YYZ.doIt) end end EVENT_MANAGER:RegisterForEvent(YYZ.ModName, EVENT_ADD_ON_LOADED, YYZ.OnAddOnLoaded)
What does ZO_CompassContainer return? My error is something about userdata.
|
ZO_CompassContainer is not a function, its a control. So it does not return anything.
Fyrakin wrote that you have to check its children controls, it means something like:
Lua Code:
for i = 1, ZO_CompassContainer:GetNumChildren() do
local control = ZO_CompassContainer:GetChild(i)
if control:GetName() == "whatever" then --I have no idea what is the name of compass pin, so...
end
end