Jump to content




[Lua] [Error] bios:205: [string "startup"]:24: '<eof>' expected


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

#1 ~Dragon

  • Members
  • 6 posts

Posted 05 August 2012 - 02:14 AM

Hi! i'm fairly new to coding so, sorry if this is a dumb mistake but, no matter how many time I write it in any way, this code will not work because of line 24. Credit to the makers of BlahOS for the code of randomSplash and the SplashScreen! Sorry about the messy code again, I'm 12 and idk a better way to write it.
term.clear()
term.setCursorPos(1,1)
--vars
--Splash made at BigText.org
splashText = {}
splashText[1] = " ____								"
splashText[2] = "|  _  _ __ __ _  __ _  ___  _ __   "
splashText[3] = "| | | | '__/ _` |/ _` |/ _ | '_  "
splashText[4] = "| |_| | | | (_| | (_| | (_) | | | | |"
splashText[5] = "|____/|_|  __,_|__, |___/|_| |_|"
splashText[6] = "				 |___/			   "
splashText[7] = "									 "
splashText[8] = "			___  ____				"
splashText[9] = "		   / _ / ___|			  "
splashText[10] = "		  | | | ___ 			 "
splashText[11] = "		  | |_| |___) |			  "
splashText[12] = "		   ___/|____/			  "
splashText[13] = "									 "
splashText[14] = "		_ _______________			"
splashText[15] = "	   / |___ /___ /___  |		   "
splashText[16] = "	   | | |_  |_   / /		  "
splashText[17] = "	   | |___) |__) |/ /			 "
splashText[18] = "	   |_|____/____//_/			  "
randomSplash {
"~Dragon is Awesome!",
"Dante is Awesome!",
"Mr.Meowingtons is a H4x0r!",
"Coded in Lua!",
"Skrillex is Beast!",
"100% Awesome!",
"Now with 100% more 1337!",
"FUS RO DAHHHHHHHHHHHH!",
"Wub Wub Wub!",
"Dragon Coded This!"
}

splash = function()
term.clear()
term.setCursorPos(1,1)
term.write("+")
term.write(string.rep("-", screen.sizeX-2))
term.write("+")
for i = 1, screen.sizeY-1 do
  term.write("|")
  for i = 2, screen.sizeX-1 do
   term.write(" ")
  end
  term.write("|")
  term.setCursorPos(1,i+1)
end
term.write("+")
term.write(string.rep("-", screen.sizeX-2))
term.write("+")
local xAlign = (screen.sizeX - 33) / 2

for i = 0, table.getn(splashText) do
  term.setCursorPos(xAlign, 2 + i)
  term.write(splashText[i])
end
term.setCursorPos(xAlign, 4 + table.getn(splashText))
term.write(randomSplash[math.random(table.getn(randomSplash))])

sleep(3)
term.clear()
term.setCursorPos(1,1)
end
mon = peripheral.wrap("right")
mon.clear()
mon.setCursorPos(1,1)
mon.setTextScale(1)
mon.write("|---------	|------  |-------|  |--------|  |--------|  |----   |--|")
mon.setCursorPos(2,1)
mon.write("| |------   | |---|  | |---| |  |  ______|  | |----| |  |	   |  |")
mon.setCursorPos(3,1)
mon.write("| |	     | |   | |  | |   | |  |  |		| |	| |  |  |  |  |")
mon.setCursorPos(4,1)
mon.write("| |		| |  | |   | |  | |   | |  |  |		| |	| |  |  |  |  |")
mon.setCursorPos(5,1)
mon.write("| |		| |  | |  / /   | |___| |  |  |   ___  | |	| |  |  |     |")
mon.setCursorPos(6,1)
mon.write("| |	   / /   | --- /	|   _   |  |  |   | |  | |	| |  |  |   	|")
mon.setCursorPos(7,1)
mon.write("| |______/ /	|  __    |  | |  |  |  |___| |  | |____| |  |  |	   |")
mon.setCursorPos(8,1)
mon.write("|_________/	 |__| |_  |__| |__|  |________|  |________|  |__|	 __|")
sleep(0.5)
mon.setCursorPos(10,1)
mon.write("						 |-----------|	 |-----------|")
mon.setCursorPos(11,1)
mon.write("						 |  |-----|  |	 |  |________|")
mon.setCursorPos(12,1)
mon.write("						 |  |	 |  |	 |  |		 ")
mon.setCursorPos(13,1)
mon.write("						 |  |	 |  |	 |  |________|")
mon.setCursorPos(14,1)
mon.write("						 |  |	 |  |	 |________|  |")
mon.setCursorPos(15,1)
mon.write("						 |  |	 |  |			  |  |")
mon.setCursorPos(16,1)
mon.write("						 |  |_____|  |	  ________|  |")
mon.setCursorPos(17,1)
mon.write("						 |___________|	 |___________|")
sleep(3)
mon.clear()
mon.setCursorPos(1,1)
mon.write("				  |------|	  |----------|  |----------|  |------|")
mon.setCursorPos(2,1)
mon.write("				  |___|  |	  |__|----|  |  |__|----|  |  |___|  |")
mon.setCursorPos(3,1)
mon.write("					  |  |			  |  |		  |  |	  |  |")
mon.setCursorPos(4,1)
mon.write("					  |  |	   |------|  |   |------|  |  |---|  |---|")
mon.setCursorPos(5,1)
mon.write("					  |  |	   |______|  |   |______|  |  |___|  |___|")
mon.setCursorPos(6,1)
mon.write("					  |  |			  |  |		  |  |	  |  |")
mon.setCursorPos(7,1)
mon.write("				  |---|  |---|  |--|____|  |  |--|____|  |	  |  |")
mon.setCursorPos(8,1)
mon.write("				  |__________|  |__________|  |__________|	  |__|")
sleep(2)
mon.clear()


#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 05 August 2012 - 02:44 AM

You forgot an = in this line:
randomSplash {
it should be:
randomSplash = {


#3 ~Dragon

  • Members
  • 6 posts

Posted 05 August 2012 - 03:07 AM

Thanks Mystic :P/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users