I recently started using love2d and came up with a slight problem.
My game starts with a menu that both have buttons (Begin & Quit).
You can press the button but it leads to an error page?
Please help , this is my first project using love2d
I have uploaded my menu and main code and if needed i can upload a player code as well.
Something I can help with, yay! You error is on line 23 where you call v.medium. You dont have a medium. I think what you want to call is v.text (the text of your button).
So this is what i changed it into and now it shows : menu.lua:23: attempt to call method 'getwidth' ( a nil value)
VVVVVVV
function button.click(x,y)
for i,v in ipairs (button) do
if x > v.x and
x < v.x + v.text:getWidth(v.text) and
y > v.y and
y< v.y + v.text:getHeight() then
if v.id =='Quit' then
love.event.push ('quit')
end
if v.id =='Begin' then
gamestate = 'playing'