Jump to content




bios:338: [string "asetup"]:44: 'end' expected (to close 'function' at line 31


  • You cannot reply to this topic
5 replies to this topic

#1 NeptunasLT

  • Banned
  • 147 posts
  • LocationVilnius,Lithuania

Posted 11 March 2013 - 06:50 AM

I'm getting this error
My code:
--ArchilyOS Setup Coded by NeptunasLT
function complete()
 print("Setup Is Completed!")
 print("System Reboot in:")
 print("3")
 sleep(1)
 print("2")
 sleep(1)
 print("1")
 sleep(1)
 os.reboot()
end
function install()
 if fs.exists("/archily") then fs.remove ("/archily")
 fs.makeDir("archily")
 fs.makeDir("/archily/system")
 shell.run("pastebin", "get", "wk0Siumq", "archily/system/gui")
 shell.run("pastebin", "get", "UhbCLCVE", "boot")
 shell.run("pastebin", "get", "320wmmdy", "archily/system/fLib")
 shell.run("pastebin", "get", "HxYuSMHP", "archily/system/file")
 shell.run("pastebin", "get", "HaSRpSLH", "archily/system/.background")
 shell.run("pastebin", "get", "3ykgdF0g", "archily/system/icon.nfp")
 shell.run("pastebin", "get", "m3X2bYjQ", "archily/system/taco")
 fs.makeDir("/archily/system/programs")
 shell.run("pastebin", "get", "BDSMjPDQ", "archily/system/programs/firewolf")
 shell.run("pastebin", "get", "LEWpvT2Z", "archily/system/programs/npaintpro")
 shell.run("pastebin", "get", "CRd9f1Ac", "archily/system/update")
 shell.run("pastebin", "get", "Mh9LTq2a", "startup")
 complete()
end
function license()
 lic = "Archily"

 print("PLs input license key")
 write" "
 input = read()
 if input == lic then
 print("starting installer...")
 install()
  else
 print("Something Bad!")
 os.reboot()
end
license()


#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 11 March 2013 - 07:08 AM

I have properly indented the code on pastebin: (it is easier to copy and paste there, I took the code in notpad and indented it)
http://pastebin.com/AbBF9326

I suggest you also read good coding habits

You can also read the errors in the pastebin

Edited by Engineer, 11 March 2013 - 07:42 AM.


#3 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 11 March 2013 - 07:13 AM

License key? You know that everybody can just type "edit asetup", right?

#4 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 11 March 2013 - 07:35 AM

if fs.exists("/archily") then fs.remove ("/archily")

You didn't end the if statement

#5 CCJJSax

  • Members
  • 262 posts

Posted 11 March 2013 - 08:06 AM

within function install() you need to put an end to end the "if fs.exists("/archily")then fs.remove ("/archily")" part

#6 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 11 March 2013 - 08:11 AM

View PostNeptunasLT, on 11 March 2013 - 06:50 AM, said:

I'm getting this error
My code:
--ArchilyOS Setup Coded by NeptunasLT
function complete()
print("Setup Is Completed!")
print("System Reboot in:")
print("3")
sleep(1)
print("2")
sleep(1)
print("1")
sleep(1)
os.reboot()
end
function install()
  if fs.exists("/archily") then fs.remove ("/archily")  -- you forgot to end this
	fs.makeDir("archily")
	fs.makeDir("/archily/system")
	shell.run("pastebin", "get", "wk0Siumq", "archily/system/gui")
	shell.run("pastebin", "get", "UhbCLCVE", "boot")
	shell.run("pastebin", "get", "320wmmdy", "archily/system/fLib")
	shell.run("pastebin", "get", "HxYuSMHP", "archily/system/file")
	shell.run("pastebin", "get", "HaSRpSLH", "archily/system/.background")
	shell.run("pastebin", "get", "3ykgdF0g", "archily/system/icon.nfp")
	shell.run("pastebin", "get", "m3X2bYjQ", "archily/system/taco")
	fs.makeDir("/archily/system/programs")
	shell.run("pastebin", "get", "BDSMjPDQ", "archily/system/programs/firewolf")
	shell.run("pastebin", "get", "LEWpvT2Z", "archily/system/programs/npaintpro")
	shell.run("pastebin", "get", "CRd9f1Ac", "archily/system/update")
	shell.run("pastebin", "get", "Mh9LTq2a", "startup")
	complete()
  end
end
function license() -- you also forgot to end this
  lic = "Archily"
end
print("Pls input license key")
write" "
input = read()
if input == lic then
print("starting installer...")
install()
  else
print("Something Bad!")
os.reboot()
end
license()






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users