Posted 13 August 2012 - 08:53 AM
hi, i have a disk that has a api and startup in the main dir.
api looks like this
and startup looks like this:
its supposed to display text and a menu but it gives me this errorafter showing the text: startup:10 attempt to call nil.
how do i get this working??
api looks like this
function inMenu(menu)
term.setCursorPos(1,1)
print("Would you like to Install makerOS?")
term.setCursorPos(1,9)
write("Selection: ")
end
function selection()
print("1. Yes")
print("2. No")
term.setCursorPos(11,9)
end
and startup looks like this:
term.clear(menu)
textutils.slowPrint("-----------",10)
term.clear()
print("Dear user, welcome to the installation process of makerOS!")
sleep(5)
print("You will now bw guided trough the installation process of your brand new makerOS release!")
sleep(5)
term.clear()
os.loadAPI("/disk/installmenu")
inMenu()
selection()
local input = read()
if input == "1" then
os.reboot()
elseif input == "2" then
print("Installation cancelled by user,rebooting")
os.reboot()
else
print("Invalid selection, please try again")
sleep(1)
os.reboot()
end
its supposed to display text and a menu but it gives me this errorafter showing the text: startup:10 attempt to call nil.
how do i get this working??