Quantcast
WoWInterface - View Single Post - not well-formed error and OnUpdate script not working. Help?
View Single Post
12-14-20, 09:41 PM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 550
Put the OnUpdate in Lua.

Lua Code:
  1. f.TimeSinceLastUpdate = 0
  2.  
  3. f:SetScript("OnUpdate",function(self,elapsed)
  4.     local gwbutton = GwGarrisonButton
  5.   self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;
  6.  
  7.  
  8.   if (self.TimeSinceLastUpdate > UIMod_UpdateInterval) then
  9.     print("UIMOD OnUpdate");
  10.         if gwbutton then
  11.             print("UIMOD OnUpdate: GW2 UI Garrison Button is shown. Hiding.");
  12.             gwbutton:Hide();
  13.         end
  14.     --
  15.  
  16.     self.TimeSinceLastUpdate = 0;
  17.   end
  18. end)

Last edited by Kanegasi : 12-15-20 at 02:04 PM. Reason: self to f (oops)
  Reply With Quote