Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this.
-
sakvojaz
- Prole
- Posts: 4
- Joined: Sun Mar 12, 2017 10:59 am
Post
by sakvojaz » Wed Apr 05, 2017 6:27 pm
Getting this error:
Script:
Code: Select all
vector = require('vrld-hump-22d0fb6/vector')
function love.load()
list = {}
root = branchCreate(startp, endp)
for i = 1, 5 do
list[i] = root
end
end
function love.update(dt)
end
function love.draw()
love.graphics.translate(love.graphics.getWidth()/2, love.graphics.getHeight())
for i = 1, 1 do
list[i] = branch.draw(startp, endp)
list[i] = branch.grow()
end
end
function branchCreate()
branch = {}
branch.draw = function()
startp = vector.new(0, 0)
endp = vector.new(0, -100)
love.graphics.line(startp, endp)
end
branch.grow = function()
end
end
-
airstruck
- Party member
- Posts: 650
- Joined: Thu Jun 04, 2015 7:11 pm
- Location: Not being time thief.
Post
by airstruck » Wed Apr 05, 2017 6:36 pm
I don't think it works like that. As far as I know all vertices need to be in a single table, with sequential indices.
-
sakvojaz
- Prole
- Posts: 4
- Joined: Sun Mar 12, 2017 10:59 am
Post
by sakvojaz » Wed Apr 05, 2017 7:19 pm
Ahh, got it. Thanks.
Users browsing this forum: No registered users and 62 guests