Page 1 of 1

class problem

Posted: Sat Apr 04, 2020 3:39 pm
by matifere
I have a problem with this program ...
This is the error
Error

Paddle.lua:1: attempt to call global 'Class' (a boolean value)


Traceback

Paddle.lua:1: in main chunk
[C]: in function 'require'
main.lua:4: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

also, I attach the files down here
pong.zip
(5.99 KiB) Downloaded 119 times

Re: class problem

Posted: Sat Apr 04, 2020 7:00 pm
by Möve
The class.lua code is written for Lua 5.3 and not for Lua 5.1. In Lua 5.1 don't exists a destructor for tables. It will not work as assumed.