I'm trying to create an outline around each box listed in an array for a WIP inventory system, with:
Code: Select all
local slots = {
{x=770,y=446,w=30,h=30}, --1
{x=806,y=446,w=30,h=30}, --2
{x=842,y=446,w=30,h=30}, --3
{x=878,y=446,w=30,h=30}, --4
{x=808,y=482,w=30,h=30}, --5
{x=806,y=482,w=30,h=30}, --6
{x=842,y=482,w=30,h=30}, --7
{x=878,y=482,w=30,h=30} --8
}
for i = #slots[1], do
( love.graphics.setColor( 1, 0, 0 )
love.graphics.rectangle( line, x, y, w, h ) )
Syntax error: main.lua:34: unexpected symbol near 'do'
What would be the proper/best way to draw an outline for each element? Thanks!