Classes

function setup()
    objects{}
    object[1]={type=Ball,x=100,y=100,direction=0}
    object[2]={type=Ballon,x=20,y=35,direction=-12}
    end
for i=1, #objects do object[i].type.Move(object[i])
end

I am reading the e-book “Lua for beginners” and this code were in the chapter classes. When I should run it, it will only appears “error”
What’s wrong with this code?

That code wasn’t supposed to be run, it was two separate examples.

OK, I misunderstood it. I thought you would put them together and run it. Thanks for your help @Ignatz