Code:
local button = {}
function fillTable(name, xmix, xmax, ymin, ymax, text)
button[name] = {}
button[name]["text"] = text
button[name]["xmix"] = xmin
button[name]["xmax"] = xmax
button[name]["ymin"] = ymin
button[name]["ymax"] = ymax
end
function createBox(name, color)
term.setBackgroundColor(color)
currentY = button[name]["ymin"]
while currentY ~= button[name]["ymax"] do
term.setCursorPos(button[name]["xmin"], currentY)
for i = 1,button[name]["xmax"] do
write(" ")
end
currentY = currentY +1
end
end
It is the function that creates the box that is giving me trouble. I keep getting this error:
btn:17: Expected number, numberWhen I look at line 17 I can't find anything wrong with it. Both of the coordinates should be numbers. If I change them from tables to just straight up numbers it works fine. It seems strange because everywhere else it works fine.
Help is appreciated!
Thanks!
P.S. Sorry for some of the weird(or lack of) indentation. I just started using sublime and when I copy it from there to here the indentation gets messed up sometimes.











