Posted 28 June 2015 - 02:00 AM
So im attempting to create my own GUI API (kind of like bedrock) but whenever i have a shell.run() in it it errors: gui(API name for now):53:attempt to index ? (a nil value)
Full API can be seen here as far as ive coded (some code has been changed since, but): http://pastebin.com/8xmWadA3
heres the problem code
Its no where near done, so excuse the messiness and horrible indentation and such. Whenever i call this function, it errors and throws attempt to index ?
Full API can be seen here as far as ive coded (some code has been changed since, but): http://pastebin.com/8xmWadA3
heres the problem code
function buttons(sx,sy,ex,ey,Obox,oc,ic,func)
run = func
if Obox == nil then
paintutils.drawFilledBox(sx,sy,ex,ey,ic)
else
paintutils.drawFilledBox(sx,sy,ex,ey,ic)
paintutils.drawBox(sx,sy,ex,ey,oc)
end
term.setTextColor(colors.white)
evnt, btn, x, y = os.pullEvent("mouse_click")
--if x >= sx and x <= ex and y >= sy and y <= ey then
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1,1)
<Where it errors>
shell.run(func)
end
Its no where near done, so excuse the messiness and horrible indentation and such. Whenever i call this function, it errors and throws attempt to index ?
Edited on 28 June 2015 - 01:04 AM