I've got a little problem, and I don't know how to resolve it...
I'm making a GUI for a music player (yes, a music player with Löve ) and I'm working on the base class 'component'. A component has got a position ( X, Y ) and a size ( W, H ) and I use some linear interpolation for animation. So, to have the X position, I need to use component:get_x function. But, for component:get_y and component:get_h, I've got this error :
Code: Select all
Error: main.lua:12: calling 'get_y' on bad self (number expected, got nil)
stack traceback:
[C]: in function 'get_y'
main.lua:12: in function 'load'
[string "boot.lua"]:407: in function <[string "boot.lua"]:399>
[C]: in function 'xpcall'
Thanks for your answers