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

Problem with scrooling tect code

Started by S0N_G0KU_Z, 10 April 2013 - 11:41 AM
S0N_G0KU_Z #1
Posted 10 April 2013 - 01:41 PM
I tried to run my scrolling text program but i get and error, (string "startup" ) :12: 'then' expected

This is ts the code
  • local pos = 18
  • ecran = peripheral.wrap("right")
  • ecran.clear()
  • ecran.setBackgroundColor(2)
  • ecran.setTextColor(2048)
  • ecran.setTextScale(5)
  • while true do
  • if pos==-30
  • pos = 18
  • end
  • mon.clear()
  • mon.setCursorPos(pos,1)
  • mon.write("GG Inc. We Make The Best")
  • pos = pos-1
  • os.sleep(.15)
  • end
Engineer #2
Posted 10 April 2013 - 01:50 PM
Add then on line 12
SadKingBilly #3
Posted 10 April 2013 - 02:43 PM
Well, you started off calling the monitor "ecran", then you swapped to calling it "mon", but you didn't rewrap it with a different name. Also, what Engineer said.
Smiley43210 #4
Posted 10 April 2013 - 05:44 PM
And please, next time, use the code tag. It makes things much nicer and compact.
S0N_G0KU_Z #5
Posted 11 April 2013 - 09:36 AM
ok thanks all of you :)/>