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

My first program

Started by C0rv0, 18 April 2013 - 12:48 PM
C0rv0 #1
Posted 18 April 2013 - 02:48 PM
Hello, this is my first program, so be very mean to me, lol just kidding. So far all this does is turn your text green, ONLY works on an advanced computer.
Spoiler


function downScreen()
  term.setBackgroundColor(colors.blue)
  for i = 1,20 do
	print("																	   ")
	sleep(0.5)
  end
  term.setBackgroundColor(colors.blue)
end
if term.isColor() then
  downScreen()
  term.setCursorPos(1,1)
  print("Welcome to C07v0s color changer!")
  term.write("Word: ")
  local word = read()
  term.setTextColor(colors.green)
  print(word)
end
if not term.isColor() then
  print("This program is only for advanced computers...........")
  return
end
OR
Link
Sammich Lord #2
Posted 18 April 2013 - 02:54 PM
So where is the complexity in this?
C0rv0 #3
Posted 18 April 2013 - 03:23 PM
Lol I meant that as a joke.
Spongy141 #4
Posted 18 April 2013 - 06:02 PM
You should add color options. Just green is kinda week.
Sariaz #5
Posted 18 April 2013 - 07:07 PM
Good for a first program only one real error I see. You don't close your print on line four, and could you explain the point of the downscreen function?
C0rv0 #6
Posted 19 April 2013 - 03:16 AM
^
Nope it does end, just I made it very long so it will fill the entire screen, BUT the reason for that is because most people do not do that to change screen color, so I thought it would be cooler this way.
Dlcruz129 #7
Posted 19 April 2013 - 04:11 AM
Also the print statement in your down screen function isn't necessary, just use term.clearLine()
jesusthekiller #8
Posted 19 April 2013 - 09:47 AM
I just can't wait to see famous "No pics, No clicks" xD

Pretty nice app for first program :)/>
Sammich Lord #9
Posted 19 April 2013 - 09:54 AM
I just can't wait to see famous "No pics, No clicks" xD

Pretty nice app for first program :)/>
It isn't famous, it's annoying.
Zudo #10
Posted 12 May 2013 - 09:57 AM
I just can't wait to see famous "No pics, No clicks" xD

Pretty nice app for first program :)/>
It isn't famous, it's annoying.

Infamous?