lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Unread 10-04-2010, 10:16 PM
SanDBoX's Avatar
SanDBoX SanDBoX is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Location: Idaho
Posts: 40
issue with functions inside of a class

I recently ran across an issue where when I am defining functions inside of a class I can no longer use the "self" identifier such as:
Code:
10   MyWindow = class( Turbine.UI.Window )
11 
12   function MyWindow:Constructor()
13     Turbine.UI.Lotro.Window.Constructor( self ) --this part works fine
14     self.int = 5
15     ...
16   end
17
18   function MyWindow:BronkenFunction()
19     self.int = self.int + 1 
20   end
Oversimplified but should give the right idea, in this kind of an instance I end up getting an "Attempt to index local self (a 'nil' value)" error, and the thing that bugs me the most is I have functions in other files that work just fine and they are written the same way (outside the constructor)

Any idea what it is that I am missing? This really has me lost tonight...
Reply With Quote
 



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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
graphics issue Jeremy3020 Interface Help (L) 0 09-21-2010 08:50 PM
Frosty! I cannot reposition any assets inside the Minimap_Window (Radar)! Supermax XML modification help (L) 11 05-27-2009 02:25 PM
Trait Panel Race/Class galenswerd Graphics modification help (L) 4 01-13-2009 12:32 PM
letterbox_bottom xp bar issue Aalwein General Authoring Discussion (L) 2 05-15-2007 08:55 AM
A anoying issue aegget Graphics modification help (L) 5 05-10-2007 06:20 AM


All times are GMT -5. The time now is 08:46 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui