2
所以我想在Love2D中制作一个按钮系统,并且我已将代码全部写出来。问题是它不会让我测试我桌子上i,v
的数量。我的代码是这样的:Love2D如果我的i,v中的#
function love.load()
colorA={"blue", "yellow"}
colorB={"blue"}
colorC={"blue"}
end
function love.update(dt)
--The update stuff that I wrote
end
function love.draw()
for i,v in pairs(colorA) do
if i,v == 2 then
love.graphics.setColor(255, 255, 0)
else
love.graphics.setColor(0, 0, 255)
end
end
love.graphics.rectangle(My button data)
--The same thing for other 2 buttons
end
,并读
"Syntax error: main.lua:57: 'then' expected near ','".
(我有更多的代码,所以不要认为它的东西,因为别的“main.lua:57”,即在线是在我的实际代码。)帮助!