Could someone please help me with this?
Here’s the code
function CreateLevelSelect()
local Level = { }
for i=1,10,1 do
local Level[i] = ui.newButton {
default = "Levelbutton.png",
onRelease = StartLevel(i),
text = i,
emboss = true
}
end
end
As you can kind of see, I’m trying to make each Level[] in the array be a button by using a loop to create 10 buttons, but I get this error: Syntax error: E:\main.lua:54: unexpected symbol near ‘[’
How do I correctly do this? I’ve tried to figure it out for a good hour now and a bunch of google searches.
[import]uid: 44393 topic_id: 7780 reply_id: 307780[/import]