Posted 21 March 2017 - 01:23 AM
Another very weird error, found I.
So I have a simple function like this:
Standard code to print a fancy string. However, when I put simple things in it like this:
It comes up with the classic:
However that's all that comes up. No number after it, no 'Window: Error' or anything else like that.
AND HERE'S THE INTERESTING PART
If I change out Print() for Write() everything works COMPLETELY fine. Except it doesn't print on the next line, of course.
This makes me think that the problem has something to do with term.setCursorPos() or something like that, as Write() doesn't use that, it just writes the string and that's it.
Any ideas?
P.S. There are sleep()'s in-between some of the printBoot()'s.
EDIT: Found something else you might find interesting. I cannot reboot my computer. Whenever I try to it comes up with the same error message (java.lang blah blah). I guess the shell is a bit broken and it doesn't know what's happening with the shell 'layers'.
EDIT2: Hard restarting my computer seemed to fix it. I think I know what the problem was but it's very difficult to explain something so silly and in-depth. :P/>
So I have a simple function like this:
function printBoot(s)
term.setBackgroundColor(tColors.bgBootup)
term.setTextColor(tColors.fgBootup)
print("BOOT: "..s)
end
Standard code to print a fancy string. However, when I put simple things in it like this:
printBoot("Initiating..")
printBoot("Checking...")
printBoot("Found.")
printBoot("Boot?")
printBoot("Booting...")
printBoot("Booted successfully. Resuming...")
It comes up with the classic:
java.lang.OutOfBoundsException
However that's all that comes up. No number after it, no 'Window: Error' or anything else like that.
AND HERE'S THE INTERESTING PART
If I change out Print() for Write() everything works COMPLETELY fine. Except it doesn't print on the next line, of course.
This makes me think that the problem has something to do with term.setCursorPos() or something like that, as Write() doesn't use that, it just writes the string and that's it.
Any ideas?
P.S. There are sleep()'s in-between some of the printBoot()'s.
EDIT: Found something else you might find interesting. I cannot reboot my computer. Whenever I try to it comes up with the same error message (java.lang blah blah). I guess the shell is a bit broken and it doesn't know what's happening with the shell 'layers'.
EDIT2: Hard restarting my computer seemed to fix it. I think I know what the problem was but it's very difficult to explain something so silly and in-depth. :P/>
Edited on 21 March 2017 - 12:28 AM