• Another "attempt to index global 'self' (a nil value)" problem
    2 replies, posted
Hi recently i decided to try lua, and I am making my first SENT. The only problem is that I am getting the "attempt to index global self ( a nil value)" error on line 93. I've been trying for hours to fix it but each time I try something it just moves the error around to a different line. I would appreciate it if somebody could please help a noob out :P Also it's been so long since I actually posted that I have no idea how to use code blocks so if somebody could help me out there too... >_< [url]http://pastebin.com/aJzDETdm[/url] is the init.lua file.
[QUOTE=synthiac;32055038]remove the "self." part on line 93. [editline]1st September 2011[/editline] actually there are a lot of spots with misuse of the self parameter. it doesn't refer to the local variables outside of the function scope at all. [url]http://www.lua.org/pil/16.html[/url] read up[/QUOTE] Thanks - will do. After reading up on some stuff there I think I have it all sorted. No more errors and my timers are all fixed. All sorted thanks.
Sorry, you need to Log In to post a reply to this thread.