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

Colors not staying when Computer reboots

Started by immaZebrah, 30 August 2013 - 12:58 AM
immaZebrah #1
Posted 30 August 2013 - 02:58 AM
Title: Colors not staying when Computer reboots

So I have my computer set up to run a program which has colors in it when the computer reboots, but when the server I'm on reboots the text turns white again and I was wondering if there was any way to prevent this from happening.. Help is greatly appreciated! :D/>
floppyjack #2
Posted 30 August 2013 - 09:04 AM
[Edit: I probably didn't understand your question right, ignore this post.]
Edited on 30 August 2013 - 08:14 AM
Kingdaro #3
Posted 30 August 2013 - 09:12 AM
Generally, the color scheme resets to white text on a black background when you shut down or restart the computer, so if that's the problem you're having, you'll need to set the colors every time you start your program, instead of expecting your colors to stay the same.
bigbaddevil6 #4
Posted 30 August 2013 - 11:08 PM
can i see the code you are using. pretty much like kingdaro said you when a server restarts the computer pretty much forgets everything it was doing so in order to keep your color you need to have it set to that color every time it starts up again.
If the colors change due to input from users say for instance you have it blue when it first starts and then you have it change to green, and you want it to be green when it starts again after server restart/crash you'll have to look into file saving so that the computer remembers the color it had, but if it stays blue and when the server derps and you want it to be blue just have it at the beginning of the program stating for it to be blue.
immaZebrah #5
Posted 31 August 2013 - 02:36 AM
Nevermind, I was using term.setTextColor(colors.red) when I should've been using mon.setTextColor(colors.red)
Thanks though guys! :D/>
Zudo #6
Posted 31 August 2013 - 02:29 PM
If you use term.redirect(monitor) you can use the normal term functions.