Search found 2 matches

by JellyBones
Tue Sep 04, 2018 3:25 am
Forum: Support and Development
Topic: How to call upon a table?
Replies: 3
Views: 2390

Re: How to call upon a table?

Figured out the issue in my syntax from https://www.lua.org/pil/4.3.5.html

This works perfectly:

Code: Select all

        for _, v in pairs(slots) do
            love.graphics.rectangle('line', v.x, v.y, 30, 30)
        end
by JellyBones
Tue Sep 04, 2018 1:53 am
Forum: Support and Development
Topic: How to call upon a table?
Replies: 3
Views: 2390

How to call upon a table?

Hi, I'm new both to Love2D and the forums! I'm trying to create an outline around each box listed in an array for a WIP inventory system, with: 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},...