Using LOVEframes, having some trouble
Posted: Wed May 01, 2013 8:24 pm
So I'm using the loveframes library to make the GUI for my game. I created a frame and tabs, but when I run the game, I get this error:
The code that's at that line in frame.lua is:
I called this function with this code:
then called that in love.load(). What is going on here? I'm fairly new to Lua, I'm mostly a C# and Javascript programmer, so maybe I'm missing something obvious. I've been hunting around on google and stackoverflow and in the docs all day and I can't figure out what's wrong.
Code: Select all
/lib/loveframes/object/frame.lua:203: attempt to index local 'skin' (a nil value)
Code: Select all
local children = self.children
local internals = self.internals
local skins = loveframes.skins.available
local skinindex = loveframes.config["ACTIVESKIN"]
local defaultskin = loveframes.config["DEFAULTSKIN"]
local selfskin = self.skin
local skin = skins[selfskin] or skins[skinindex]
local drawfunc = skin.DrawFrame or skins[defaultskin].DrawFrame <-- line 203
local draw = self.Draw
local drawcount = loveframes.drawcount
Code: Select all
function managementTabs()
local frame = loveframes.Create("frame")
frame:SetName("Tabs")
frame:SetSize(1280, 100)
frame:Center()
local tabs = loveframes.Create("tabs", frame)
tabs:SetPos(0, 0)
tabs:SetSize(1280, 100)
for i=1, 5 do
local text1 = loveframes.Create("text")
text1:SetText("Tab " ..i)
tabs:AddTab("Tab " ..i, text1, "Tab " ..i)
end