Class help
Posted: Fri Mar 09, 2012 11:58 pm
Hay all, I'm new to Lua, but I'm intermediate at c++ and python. Lua's classes are confusing me. I downloaded a class.lua file (http://pastie.org/3560847) which apparently makes lua working in a more OO way.
Anyway, I now have 2 files which are my work: main.lua (http://pastie.org/3560849) and obj.lua (http://pastie.org/3560852).
I can't however make 2 obj objects, only 1 ever works. Can someone explain why this is the case please, and any advice if I'm doing anything majorly wrong here.
Anyway, I now have 2 files which are my work: main.lua (http://pastie.org/3560849) and obj.lua (http://pastie.org/3560852).
I can't however make 2 obj objects, only 1 ever works. Can someone explain why this is the case please, and any advice if I'm doing anything majorly wrong here.