This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
cunners's profile picture

[LUA] BIOS:206 error

Started by cunners, 06 December 2012 - 05:29 AM
cunners #1
Posted 06 December 2012 - 06:29 AM
Sorry for n00b question. Spent all day reading the forum and watching youtube trying to understand how LUA works for a complete beginner with absolutely no programming skills what so ever and I'm strugging with it! Been experimenting trying to make a simple menu system using the pullEvent command to load other programs, but getting a bios:206: [string "a"]:15: 'then' expected error when I try to run it. Can anyone point me in the right direction please?




while true do
	    event, param1 = os.pullEvent()
	    if event == "char" and param1 == "1" then
			  shell.run("a")
		elseif event == "char" and param1 == "2" then
			  shell.run("b")
	    elseif event == "char" and param1 == "3" then
			  break
	   end
end
Zudo #2
Posted 06 December 2012 - 06:31 AM
the A program is causing the problem
bjornir90 #3
Posted 06 December 2012 - 06:34 AM
Can you post the "a" program please ? If you want help on it obviously XD
cunners #4
Posted 06 December 2012 - 06:39 AM
oh well at least that bit of the program works then cheers! I have a feeling that this is going to be a long night..
Cranium #5
Posted 06 December 2012 - 06:42 AM
What is the code in the program labelled "a"? That is the one giving you an error on line 15.
"bios:206: [string "a"]:15: 'then' expected" means that there is a error on bios level, with program "a", on line 15, needing a 'then'
cunners #6
Posted 06 December 2012 - 06:43 AM
ah thanks, wll have another look at the other program before I give up and ask
cunners #7
Posted 06 December 2012 - 07:19 AM
Thanks for the pointer, found and fixed 4 errors in the other program and it's now all working, much more satisfying trying to solve it myself. Will bank a n00b question for another time!
bjornir90 #8
Posted 06 December 2012 - 08:07 AM
much more satisfying trying to solve it myself.
That's why we try to let people let them solve problems by themselves because it's more satisfying and it let you learn more than just copying a snippet of code that you don't understand ;)/>