Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-15-07, 07:27 PM   #1
Tatheltek
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 43
On update not working

XML
Code:
				
<OnLoad>
        self_timeSinceLastUpdate = 0
</OnLoad>
LUA
Code:
	
Backlash_UpdateInterval = 2.0
			
function Backlash_OnUpdate(self, elapsed)
  	self.timeSinceLastUpdate = self.timeSinceLastUpdate + elapsed; 	

  	while (self.timeSinceLastUpdate > Backlash_UpdateInterval) do
		BacklashMainFrame:Hide();

    	self.timeSinceLastUpdate = self.timeSinceLastUpdate - Backlash_UpdateInterval;
  	end
end

Error:
Interface\AddOns\Backlash\Backlash.lua:42: attempt to perform arithmetic on field 'timeSinceLastUpdate' (a nil value)
Count: 99

Call Stack:
[C]: ?
Interface\AddOns\Backlash\Backlash.lua:42: in function `Backlash_OnUpdate'
[string "*:OnUpdate"]:1: in function <[string "*:OnUpdate"]:1>

Line 41 is: self.timeSinceLastUpdate = self.timeSinceLastUpdate + elapsed;

Last edited by Tatheltek : 12-15-07 at 07:41 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » On update not working


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