Posted 19 September 2013 - 09:58 AM
Okay so I am making a downloader program but it keeps saying:
I have looked over this code constantly and I have no idea where it is coming from? help please
her is the program code:
startup:23: attempt to index ? (a nil value)
I have looked over this code constantly and I have no idea where it is coming from? help please
her is the program code:
term.clear()
term.setCursorPos(1,1)
print("|=================================================|")
print("| Welcome to HiveOnline - Version: 1.11.2 (Alpha) |")
print("|-------------------------------------------------|")
print("| All Hive products and logos are licensed under |")
print("| the Creative Commons Attribution-NoDerivs 3.0 |")
print("| Unported License. To view this license, visit: |")
print("| http://creativecommons.org/licenses/by-nd/3.0/. |")
print("|-------------------------------------------------|")
print("| Do you accept the license? |")
print("| + Press 1 for Yes |")
print("| + Press 2 for No |")
print("|=================================================|")
local event, param1 = os.pullEvent("char")
if param1 == "1" then
print("Thank you for accepting the license")
sleep(1)
print("Downloading Installer, Please Stand By...")
installer = http.get("https://raw.github.com/dannysmc95/hiveonline/master/installer")
installerFile = installer.readAll()
local file = fs.open("installer", "w" )
file.write(installerFile)
file.close()
print("Done!")
shell.run("installer")
elseif param1 == "2" then
term.clear()
term.setCursorPos(1,1)
print("Sorry!")
print("This operating system isn't available to users")
print("who do not accept the license.")
print(" ")
print("DannySMc")
os.shutdown()
else
os.reboot()
end