attempt to index local 'button' (a number value)
Posted: Fri Apr 03, 2020 12:25 pm
Error
main.lua:492: attempt to index local 'button' (a number value)
Traceback
main.lua:492: in function <main.lua:486>
[C]: in function 'xpcall'
After launching I can click anywhere on the screen and I get the error. It refers to:
for i,v in ipairs(button.activeId) do
The strange part is, that I use the exact same loop some lines above to draw the buttons on the title screen and it works.
I hope somebody can help me. Thanks!
Here is my .love:
main.lua:492: attempt to index local 'button' (a number value)
Traceback
main.lua:492: in function <main.lua:486>
[C]: in function 'xpcall'
After launching I can click anywhere on the screen and I get the error. It refers to:
for i,v in ipairs(button.activeId) do
The strange part is, that I use the exact same loop some lines above to draw the buttons on the title screen and it works.
I hope somebody can help me. Thanks!
Here is my .love: