Here is a test app I made:
-- Bug
Cc = class()
function Cc:init(x,t,c,tr)
-- you can accept and set parameters here
print(x+t+c+tr)
end
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
b = Cc()
b:init(28,372,2,2938)
end
When I run it it displays an error:
attempt to perform arithmetic on a nil value (local x)
I really don’t know what is happening O_o