Thread Tools Display Modes
03-18-10, 03:25 PM   #1
Xabora
A Murloc Raider
 
Xabora's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 4
Unhappy OnUpdate Issue

EDIT: Resolved, thanks!

Last edited by Xabora : 03-18-10 at 05:47 PM.
  Reply With Quote
03-18-10, 04:05 PM   #2
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Are you passing that function to a frame's SetScript method?

lua Code:
  1. local f=CreateFrame("frame")
  2. local myOnUpdate = function(self, elapsed)
  3.     self.t = self.t and self.t - elapsed or 1
  4.     if self.t < 0 then
  5.         self.t = 1
  6.         print("hi")
  7.     end
  8. end
  9. f:SetScript("OnUpdate", myOnUpdate)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » OnUpdate Issue


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off