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

BIOS (mod) producing problems

Started by H4X0RZ, 15 January 2014 - 09:54 AM
H4X0RZ #1
Posted 15 January 2014 - 10:54 AM
Hello community,
I was working on a modified BIOS for my "new OS" (I know you don't like to read this two words :D/>).

Okay, now the problem:
I don't get any error messages, it just don't start the lua interpreter. I can't give much information about the problem, because there is nothing to tell you D:

So, If someone want's to "waste" his/her time for me and try to help me fixing this BIOS mod, go ahead :D/>

~Freack100


EDIT:
Forgot the link xD
http://pastebin.com/Pj83QGt7
Edited on 15 January 2014 - 09:55 AM
LBPHacker #2
Posted 15 January 2014 - 11:48 AM
The first thing I saw was the call to write (which is not defined) in print. Anyway. Just do this and you'll be fine:
local ok, err = pcall(function()
	-- ... all your code here
end)
term.setTextColor(1)
term.setBackgroundColor(32768)
term.clear()
term.setCursorPos(1, 1)
term.write(err)
coroutine.yield("key")

There might be other errors, but I didn't have the time nor the urge to find them all. That setup with pcall and the others is enough to keep you informed about errors. I'm working on an OS too, and I know for a fact that messing with the BIOS like that can give you quite the headaches sometimes.
Edited on 15 January 2014 - 10:53 AM